Moving picture coding method, moving picture decoding method, moving picture coding apparatus, moving picture decoding apparatus, and moving picture coding and decoding apparatus

ABSTRACT

A moving picture coding method includes: coding, using a motion vector, a current block to be coded; generating a plurality of predictive motion vectors; and coding the motion vector using one of the predictive motion vectors, and when a co-located block included in a coded picture and co-located with the current block has two reference motion vectors and reference directions of the two reference motion vectors are the same, a first prediction vector is generated using a first reference motion vector and a second prediction vector is generated using a second reference motion vector in the generating of a plurality of predictive motion vectors.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a continuation of application Ser. No. 15/790,374, filed Oct.23, 2017, which is a continuation of application Ser. No. 14/856,965,filed Sep. 17, 2015, now U.S. Pat. No. 9,832,480, which is acontinuation of application Ser. No. 13/409,810, filed Mar. 1, 2012, nowU.S. Pat. No. 9,210,440, which claims the benefit of U.S. ProvisionalPatent Application No. 61/448,683 filed Mar. 3, 2011. The entiredisclosures of the above-identified applications, including thespecifications, drawings and claims are incorporated herein by referencein their entirety.

TECHNICAL FIELD

The present invention relates to moving picture coding methods andmoving picture decoding methods.

BACKGROUND ART

In moving picture coding processes, the quantity of information isgenerally reduced using redundancy of the moving pictures in spatial andtemporal directions. Here, a method using the redundancy in the spatialdirection is generally represented by the transformation into thefrequency domain. A method using the redundancy in the temporaldirection is represented by an inter-picture prediction (hereinafterreferred to as inter prediction) coding process.

In the inter prediction coding process, when coding a certain picture, acoded picture located, in display time order, before or after thecurrent picture to be coded is used as a reference picture.Subsequently, a motion vector is derived through motion estimation ofthe current picture with respect to the reference picture, and adifference is calculated between image data of the current picture andprediction picture data resulting from motion compensation based on themotion vector, to remove the redundancy in the temporal direction. Here,in the motion estimation, values of difference between blocks within thereference picture and a current block to be coded which is included inthe current picture are calculated, and one of the blocks within thereference picture which has the smallest value of difference is definedas a reference block. Using the current block and the reference block, amotion vector is then estimated.

In the moving picture coding scheme called H.264, which has already beenstandardized, three types of pictures: I-picture, P-picture, andB-picture, are used to reduce the quantity of information. The I-pictureis a picture on which no inter prediction coding process is performed,that is, on which only an intra-picture prediction (hereinafter referredto as intra prediction) coding process is performed. The P-picture is apicture on which the inter prediction coding process is performed withreference to only one coded picture located before or after the currentpicture in display time order. The B-picture is a picture on which theinter prediction coding process is performed with reference to two codedpictures located before or after the current picture in display timeorder.

In the inter prediction coding, a reference picture list for specifyingthe reference picture is generated. The reference picture list is a listin which a reference picture index is assigned to each coded referencepicture which is referred to in the inter prediction. For example, aB-picture holds two reference picture lists because it can be coded withreference to two pictures. By the reference picture index, a referencepicture is then specified from the reference picture lists.

FIG. 13 shows an example of the reference picture lists in a B-picture.A reference picture list 0 (hereinafter referred to as a reference listL0) in FIG. 13 is an example of the reference picture list in aprediction direction 0 in bi-directional prediction. In the example ofFIG. 13, a reference picture 1 in display order 2 is assigned to a value0 of a reference picture index 0, a reference picture 2 in display order1 is assigned to a value 1 of the reference picture index 0, and areference picture 3 in display order 0 is assigned to a value 2 of thereference picture index 0. In other words, the reference picture indicesare assigned in order from temporally closest to the current picture indisplay order.

Meanwhile, a reference picture list 1 (hereinafter referred to as areference list L1) is an example of the reference picture list in aprediction direction 1 in bi-directional prediction. In the example ofFIG. 13, a reference picture 2 in display order 1 is assigned to a value0 of a reference picture index 1, a reference picture 1 in display order2 is assigned to a value 1 of the reference picture index 1, and areference picture 3 in display order 0 is assigned to a value 2 of thereference picture index 1.

As above, it is possible that the reference picture indices assigned toeach reference picture are different in each prediction direction(reference pictures 1 and 2 in FIG. 13) and that the reference pictureindices assigned to each reference picture are the same in therespective prediction directions (a reference picture 3 in FIG. 13). Incoding a B-picture, the inter prediction will be performed using amotion vector (mvL0) which refers to the reference picture specified bythe reference picture index 0 in the reference list L0 and a motionvector (mvL1) which refers to the reference picture specified by thereference picture index 1 in the reference list L1. In coding aP-picture, only one reference list will be used.

Furthermore, in the moving picture coding scheme called H.264, a codingmode called temporal direct mode can be selected at the time of derivinga motion vector in coding of a B-picture. The inter prediction codingmethod in temporal direct is described with reference to FIG. 14. FIG.14 illustrates motion vectors in temporal direct and shows the casewhere a block “a” in a picture B2 is coded in temporal direct.

This case uses a motion vector “a” of a block “b” that is co-locatedwith the block “a” and included in a picture P3 which is a referencepicture located after the picture B2. The motion vector “a” is a motionvector used in coding of the block “b” and refers to a picture P1. Usinga motion vector parallel to the motion vector “a”, a reference block isthen obtained from each of the picture P1 which is a forward referencepicture and the picture P3 which is a backward reference picture, andthe block “a” is coded based on bi-directional prediction. Specifically,the motion vectors used in coding of the block “a” are a motion vector“b” with respect to the picture P1 and a motion vector “c” with respectto the picture P3.

CITATION LIST Non Patent Literature

ITU-T H. 264 03/2010

SUMMARY OF INVENTION Technical Problem

However, in the case of the conventional temporal direct, the motionvector to be used in temporal direct is limited to a motion vector whichis of a reference picture located, in display time order, after acurrent picture to be coded and is directed forward in display timeorder.

Such limitation of the motion vector to be used in temporal directcauses problems of making it difficult to derive the motion vector mostsuitable for the current block, which leads to a decreased compressionrate.

The present invention has an object to solve the above problems and aimsto derive the motion vector most suitable for the current picture andimprove the compression rate by adaptively selecting a motion vector tobe used in temporal direct.

Solution to Problem

A moving picture coding method according to an aspect of the presentinvention is a method of coding, based on inter prediction, a currentblock to be coded which is included in a current picture to be coded.Specifically, the moving picture coding method comprises: coding thecurrent block using a motion vector; generating a plurality ofpredictive motion vectors; and coding the motion vector using one of thepredictive motion vectors generated in the generating. Furthermore, whena co-located block included in a coded picture and co-located with thecurrent block has two reference motion vectors and reference directionsof the two reference motion vectors are the same, in the generating, afirst prediction vector of the current block is generated using a firstreference motion vector out of the two reference motion vectors, thefirst prediction vector and the first reference motion vector eachcorresponding to a first reference picture list, and a second predictionvector of the current block is generated using a second reference motionvector out of the two reference motion vectors, the second predictionvector and the second reference motion vector each corresponding to asecond reference picture list.

In the above method, a motion vector to be used in temporal direct isadaptively selected, which makes it possible to derive the motion vectormost suitable for the current picture and to improve the compressionrate.

As an example, in the generating, when the coded picture is locatedbefore the current picture in display order and both of the tworeference motion vectors are forward reference motion vectors, the firstprediction vector may be generated using the first reference motionvector, and the second prediction vector may be generated using thesecond reference motion vector.

As another example, in the generating, when the coded picture is locatedafter the current picture in display order and both of the two referencemotion vectors are backward reference motion vectors, the firstprediction vector may be generated using the first reference motionvector, and the second prediction vector may be generated using thesecond reference motion vector.

Furthermore, in the generating, when the reference directions of the tworeference motion vectors are different, the first prediction vector andthe second prediction vector may be generated using a reference motionvector directed toward the current picture out of the two referencemotion vectors.

As an example, in the generating, when the coded picture is locatedbefore the current picture in display order, the first prediction vectorand the second prediction vector may be generated using a backwardreference motion vector out of the two reference motion vectors.

As another example, in the generating, when the coded picture is locatedafter the current picture in display order, the first prediction vectorand the second prediction vector may be generated using a forwardreference motion vector out of the two reference motion vectors.

A moving picture decoding method according to an aspect of the presentinvention is a method of decoding, based on inter prediction, a currentblock to be decoded which is included in a current picture to bedecoded. Specifically, the moving picture decoding method comprises:generating a plurality of predictive motion vectors; decoding a motionvector using one of the predictive motion vectors generated in thegenerating; and decoding the current block using the motion vectordecoded in the decoding of a motion vector. Furthermore, when aco-located block included in a decoded picture and co-located with thecurrent block has two reference motion vectors and reference directionsof the two reference motion vectors are the same, in the generating, afirst prediction vector of the current block is generated using a firstreference motion vector out of the two reference motion vectors, thefirst prediction vector and the first reference motion vector eachcorresponding to a first reference picture list, and a second predictionvector of the current block is generated using a second reference motionvector out of the two reference motion vectors, the second predictionvector and the second reference motion vector each corresponding to asecond reference picture list.

A moving picture coding apparatus according to an aspect of the presentinvention is an apparatus which codes, based on inter prediction, acurrent block to be coded which is included in a current picture to becoded. Specifically, the moving picture coding apparatus comprises: animage coding unit configured to code the current block using a motionvector; a candidate predictive motion vector generation unit configuredto generate a plurality of predictive motion vectors; and a motionvector coding unit configured to code the motion vector using one of thepredictive motion vectors generated by the candidate predictive motionvector generation unit. Furthermore, when a co-located block included ina coded picture and co-located with the current block has two referencemotion vectors and reference directions of the two reference motionvectors are the same, the candidate predictive motion vector generationunit is configured to: generate a first prediction vector of the currentblock using a first reference motion vector out of the two referencemotion vectors, the first prediction vector and the first referencemotion vector each corresponding to a first reference picture list; andgenerate a second prediction vector of the current block using a secondreference motion vector out of the two reference motion vectors, thesecond prediction vector and the second reference motion vector eachcorresponding to a second reference picture list.

A moving picture decoding apparatus according to an aspect of thepresent invention is an apparatus which decodes, based on interprediction, a current block to be decoded which is included in a currentpicture to be decoded, Specifically, the moving picture decodingapparatus comprises: a candidate predictive motion vector generationunit configured to generate a plurality of predictive motion vectors; amotion vector decoding unit configured to decode a motion vector usingone of the predictive motion vectors generated by the candidatepredictive motion vector generation unit; and an image decoding unitconfigured to decode the current block using the motion vector decodedby the motion vector decoding unit. Furthermore, when a co-located blockincluded in a decoded picture and co-located with the current block hastwo reference motion vectors and reference directions of the tworeference motion vectors are the same, the candidate predictive motionvector generation unit is configured to: generate a first predictionvector of the current block using a first reference motion vector out ofthe two reference motion vectors, the first prediction vector and thefirst reference motion vector each corresponding to a first referencepicture list; and generate a second prediction vector of the currentblock using a second reference motion vector out of the two referencemotion vectors, the second prediction vector and the second referencemotion vector each corresponding to a second reference picture list.

A moving picture coding and decoding apparatus according to an aspect ofthe present invention is a moving picture coding and decoding apparatuswhich comprises: a moving picture coding unit configured to code, basedon inter prediction, a current block to be coded which is included in acurrent picture to be coded; and a moving picture decoding unitconfigured to decode, based on inter prediction, a current block to bedecoded which has been generated by the moving picture coding unit. Themoving picture coding unit includes: an image coding unit configured tocode, using a motion vector, the current block to be coded; a firstcandidate predictive motion vector generation unit configured togenerate a plurality of predictive motion vectors; and a motion vectorcoding unit configured to code the motion vector using one of thepredictive motion vectors generated by the first candidate predictivemotion vector generation unit. Furthermore, when a co-located blockincluded in a coded picture and co-located with the current block to becoded has two reference motion vectors and reference directions of thetwo reference motion vectors are the same, the first candidatepredictive motion vector generation unit is configured to: generate afirst prediction vector of the current block to be coded, using a firstreference motion vector out of the two reference motion vectors, thefirst prediction vector and the first reference motion vector eachcorresponding to a first reference picture list; and generate a secondprediction vector of the current block to be coded, using a secondreference motion vector out of the two reference motion vectors, thesecond prediction vector and the second reference motion vector eachcorresponding to a second reference picture list. The moving picturedecoding apparatus comprises: a second candidate predictive motionvector generation unit configured to generate a plurality of predictivemotion vectors; a motion vector decoding unit configured to decode amotion vector using one of the predictive motion vectors generated bythe second candidate predictive motion vector generation unit; and animage decoding unit configured to decode the current block to bedecoded, using the motion vector decoded by the motion vector decodingunit. Furthermore, when a co-located block included in a decoded pictureand co-located with the current block to be decoded has two referencemotion vectors and reference directions of the two reference motionvectors are the same, the second candidate predictive motion vectorgeneration unit is configured to: generate a first prediction vector ofthe current block to be decoded, using a first reference motion vectorout of the two reference motion vectors, the first prediction vector andthe first reference motion vector each corresponding to a firstreference picture list; and generate a second prediction vector of thecurrent block to be decoded, using a second reference motion vector outof the two reference motion vectors, the second prediction vector andthe second reference motion vector each corresponding to a secondreference picture list.

Advantageous Effects of Invention

According to the present invention, a motion vector to be used intemporal direct is adaptively selected, which makes it possible toderive the motion vector most suitable for the current picture and toimprove the compression rate.

BRIEF DESCRIPTION OF DRAWINGS

These and other objects, advantages and features of the invention willbecome apparent from the following description thereof taken inconjunction with the accompanying drawings that illustrate a specificembodiment of the present invention. In the Drawings:

FIG. 1A is a block diagram showing a moving picture coding apparatusaccording to Embodiment 1;

FIG. 1B shows the position of a co-located block;

FIG. 2 shows an outline of a processing flow of a moving picture codingmethod according to Embodiment 1;

FIG. 3A shows an example of candidate predictive motion vectors;

FIG. 3B shows an example of priority rankings of the candidatepredictive motion vectors;

FIG. 3C shows another example of the priority rankings of the candidatepredictive motion vectors;

FIG. 3D shows another example of the priority rankings of the candidatepredictive motion vectors;

FIG. 3E shows another example of the priority rankings of the candidatepredictive motion vectors;

FIG. 4 shows an example of a code table which is used in the case ofperforming variable-length coding on predictive motion vector indices;

FIG. 5 shows a flow of determining a candidate predictive motion vector;

FIG. 6 shows in detail the flow of processing in Step S12 of FIG. 2;

FIG. 7A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block has twoforward reference motion vectors;

FIG. 7B shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block has twobackward reference motion vectors;

FIG. 8A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block is abackward reference block and has both a forward reference motion vectorand a backward reference motion vector;

FIG. 8B shows an example of calculating a temporal direct vector, whichis applied in the case where the co-located block is a backwardreference block and has a backward reference motion vector only;

FIG. 9A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block is aforward reference block and has both a forward reference motion vectorand a backward reference motion vector;

FIG. 9B shows an example of calculating a temporal direct vector, whichis applied in the case where the co-located block is a forward referenceblock and has a forward reference motion vector only;

FIG. 10 shows in detail another example of the flow of processing inStep S12 of FIG. 2;

FIG. 11 is a block diagram showing a moving picture decoding apparatusaccording to Embodiment 3;

FIG. 12 shows an outline of a processing flow of a moving picturedecoding method according to Embodiment 3;

FIG. 13 shows an example of reference picture lists in a B-picture;

FIG. 14 illustrates an inter prediction coding method in temporaldirect;

FIG. 15 illustrates an overall configuration of a content providingsystem for implementing content distribution services;

FIG. 16 illustrates an overall configuration of a digital broadcastingsystem;

FIG. 17 is a block diagram illustrating an example of a configuration ofa television;

FIG. 18 is a block diagram illustrating an example of a configuration ofan information reproducing/recording unit that reads and writesinformation from and on a recording medium that is an optical disk;

FIG. 19 shows an example of a configuration of a recording medium thatis an optical disk;

FIG. 20A shows an example of a cellular phone, and FIG. 20B is a blockdiagram showing an example of a configuration of the cellular phone;

FIG. 21 illustrates a structure of the multiplexed data;

FIG. 22 schematically illustrates how each of streams is multiplexed inmultiplexed data;

FIG. 23 illustrates how a video stream is stored in a stream of PESpackets in more detail;

FIG. 24 shows a structure of TS packets and source packets in themultiplexed data;

FIG. 25 shows a data structure of a PMT;

FIG. 26 illustrates an internal structure of multiplexed datainformation;

FIG. 27 shows an internal structure of stream attribute information;

FIG. 28 shows steps for identifying video data;

FIG. 29 is a block diagram illustrating an example of a configuration ofan integrated circuit for implementing the moving picture coding methodand the moving picture decoding method according to each of Embodiments;

FIG. 30 shows a configuration for switching between driving frequencies;

FIG. 31 shows steps for identifying video data and switching betweendriving frequencies;

FIG. 32 shows an example of a look-up table in which standards of videodata are associated with the driving frequencies; and

FIG. 33A shows an example of a configuration for sharing a module of asignal processing unit, and FIG. 33B is a diagram showing anotherexample of a configuration for sharing a module of a signal processingunit.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention are described below with referenceto the drawings.

Embodiment 1

FIG. 1A is a block diagram showing a moving picture coding apparatusaccording to Embodiment 1 of the present invention.

A moving picture coding apparatus 100 includes, as shown in FIG. 1A, asubtracting unit 101, an orthogonal transform unit 102, a quantizationunit 103, an inverse quantization unit 104, an inverse orthogonaltransform unit 105, an adding unit 106, a block memory 107, a framememory 108, an intra prediction unit 109, an inter prediction unit 110,a switch 111, an inter prediction control unit 112, a picture typedetermination unit 113, a temporal direct vector calculation unit 114, aco-located reference direction determination unit 115, and avariable-length coding unit 116.

The subtracting unit 101 obtains, from outside the apparatus, an inputpicture sequence including a current block to be coded and obtains aprediction block from the switch 11, and then outputs, to the orthogonaltransform unit 102, a residual block generated by subtracting theprediction block from the current block.

The orthogonal transform unit 102 transforms, from the image domain tothe frequency domain, the residual block obtained from the subtractingunit 101, and outputs a transform coefficient to the quantization unit103. The quantization unit 103 quantizes the transform coefficientobtained from the orthogonal transform unit 102 and outputs thequantized coefficient to the inverse quantization unit 104 and thevariable-length coding unit 116.

The inverse quantization unit 104 inversely quantizes the quantizedcoefficient obtained from the quantization unit 103 and outputs thereconstructed transform coefficient to the inverse orthogonal transformunit 105. The inverse orthogonal transform unit 105 transforms, from thefrequency domain to the image domain, the reconstructed transformcoefficient obtained from the inverse quantization unit 104 and outputsthe reconstructed residual block to the adding unit 106.

The adding unit 106 adds the reconstructed residual block obtained fromthe inverse orthogonal transform unit 105 and the prediction blockobtained from the switch 111 and outputs the reconstructed current block(input picture sequence) to the block memory 107 and the frame memory108. The block memory 107 stores the reconstructed input picturesequence per block. The frame memory 108 stores the reconstructed inputpicture sequence per frame.

The picture type determination unit 113 determines which one of thepicture types: I-picture, B-picture, and P-picture, is used to code theinput picture sequence, and generates picture type information. Thepicture type determination unit 113 then outputs the generated picturetype information to the switch 111, the inter prediction control unit112, the co-located reference direction determination unit 115, and thevariable-length coding unit 116.

The intra prediction unit 109 generates the prediction block byperforming intra prediction for the current block with use of thereconstructed block-by-block input picture sequence stored in the blockmemory 107, and outputs the generated prediction block to the switch111. The inter prediction unit 110 generates the prediction block byperforming inter prediction for the current block with use of thereconstructed frame-by-frame input picture sequence stored in the framememory 108 and a motion vector derived through motion estimation, andoutputs the generated prediction block to the switch 111.

The switch 111 outputs, to the subtracting unit 110 and the adding unit106, the prediction block generated by the intra prediction unit 109 orthe prediction block generated by the inter prediction unit 110. Forexample, the switch 111 may be designed to output one of the twoprediction blocks which is lower in coding cost

The co-located reference direction determination unit 115 determineswhich one of a block included in a picture located, in display timeorder, before a current picture to be coded (hereinafter referred to asa forward reference block) and a block included in a picture locatedafter the current picture in display time order (hereinafter referred toas a backward reference block) will be a co-located block. Theco-located reference direction determination unit 115 then generates aco-located reference direction flag for each picture and outputs thegenerated co-located reference direction flag to the temporal directvector calculation unit 114 and the variable-length coding unit 116.

Here, the co-located block indicates a block which is included in acoded picture different from the current picture including the currentblock and whose position in the coded picture is the same as the currentblock (block A of FIG. 1B). It is to be noted that although theco-located block is a block whose position in the coded picture is thesame as the current block in this embodiment, the co-located block isnot always limited to such block. For example, peripheral blocks of theblock A co-located with the current block, such as blocks B, C, D, and Ein FIG. 1B, may each be used as the co-located block. With this, in thecase where the block A is coded based on intra prediction and thereforehas no motion vector, for example, one of the peripheral blocks B, C, D,and E can be used as the co-located block. As a result, the accuracy ofa temporal direct vector can be improved, which allows improvement inthe coding efficiency.

The temporal direct vector calculation unit 114 derives, by way oftemporal direct using a reference motion vector of the co-located block,a temporal direct vector which is a candidate predictive motion vector.The temporal direct vector calculation unit 114 then outputs the derivedtemporal direct vector to the inter prediction control unit 112.

Specifically, when the co-located block has two reference motion vectorsin the same reference direction, the temporal direct vector calculationunit 114 derives, by way of temporal direct using the two motion vectorsof the co-located block, candidate predictive motion vectors (a temporaldirect vector TMVL0 in a prediction direction 0 and a temporal directvector TMVL1 in a prediction direction 1). Furthermore, the temporaldirect vector calculation unit 114 assigns each of the temporal directvectors in the respective prediction directions with a value of acorresponding predictive motion vector index. It is to be noted that“two reference motion vectors in the same reference direction” indicatesthe case where the co-located block has two forward reference motionvectors (motion vectors calculated with reference to pictures locatedbefore the coded picture in display order) or two backward referencemotion vectors (motion vectors calculated with reference to pictureslocated after the coded picture in display order).

When the co-located block does not have two forward or backwardreference motion vectors (typically when the co-located block has tworeference motion vectors in different reference directions), thetemporal direct vector calculation unit 114 determines, based on whetherthe co-located block is a forward reference block or a backwardreference block, a motion vector of the co-located block which is to beused in temporal direct. Specifically, the temporal direct vectorcalculation unit 114 calculates a candidate predictive motion vectorusing one of the two reference motion vectors of the co-located blockwhich is directed toward the current picture.

When the co-located block is a backward reference block, the temporaldirect vector calculation unit 114 derives a candidate predictive motionvector (the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1) byway of temporal direct using a forward reference motion vector of theco-located block.

It is to be noted that when the co-located block has no forwardreference motion vector (that is, when the co-located block has abackward reference motion vector only), the temporal direct vectorcalculation unit 114 derives a candidate predictive motion vector (thetemporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1) by way oftemporal direct using the backward reference motion vector of theco-located block.

When the co-located block is a forward reference block, the temporaldirect vector calculation unit 114 derives a candidate predictive motionvector (the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1) byway of temporal direct using a backward reference motion vector of theco-located block.

It is to be noted that when the co-located block has no backwardreference motion vector (that is, when the co-located block has aforward reference motion vector only), the temporal direct vectorcalculation unit 114 derives a candidate predictive motion vector (thetemporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1) by way oftemporal direct using the forward reference motion vector of theco-located block.

The inter prediction control unit 112 determines that the motion vectoris coded using one of a plurality of candidate predictive motion vectorswhich has the smallest error relative to the motion vector derivedthrough motion estimation. Here, the error indicates a value ofdifference between the candidate predictive motion vector and the motionvector derived through motion estimation, for example. Furthermore, theinter prediction control unit 112 generates, per block, a predictivemotion vector index which corresponds to the determined predictivemotion vector. The inter prediction control unit 112 then sends thepredictive motion vector index and error information on the candidatepredictive motion vector to the variable-length coding unit 116.

The variable-length coding unit 116 generates a bit stream by performingvariable-length coding on: the quantized coefficient obtained from thequantization unit 103; the predictive motion vector index and the errorinformation on the candidate predictive motion vector, obtained from theinter prediction control unit 112; the picture type information obtainedfrom the picture type determination unit 113; and the co-locatedreference direction flag obtained from the co-located referencedirection determination unit 115.

FIG. 2 shows an outline of a processing flow of a moving picture codingmethod according to Embodiment 1 of the present invention.

When a candidate predictive motion vector is derived in temporal direct,the co-located reference direction determination unit 115 determineswhich one of the forward reference block and the backward referenceblock will be the co-located block (S11). Furthermore, the co-locatedreference direction determination unit 115 generates, per picture, aco-located block reference flag that indicates whether the co-locatedblock is a forward reference block or a backward reference block, andoutputs the generated co-located block reference flag to the temporaldirect vector calculation unit 114 and the variable-length coding unit116.

Next, the temporal direct vector calculation unit 114 derives acandidate predictive motion vector by way of temporal direct using areference motion vector of the co-located block. When the co-locatedblock has two forward or backward reference motion vectors, the temporaldirect vector calculation unit 114 derives, by way of temporal directusing the two motion vectors of the co-located block, candidatepredictive motion vectors (the temporal direct vector TMVL0 in theprediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1). Furthermore, the temporal direct vectorcalculation unit 114 assigns each of the temporal direct vectors in therespective prediction directions with a value of a correspondingpredictive motion vector index.

More specifically, the temporal direct vector calculation unit 114generates a first prediction vector (TVML0) that corresponds to a firstreference picture list of the current block, using a first referencemotion vector that corresponds to the first picture list out of tworeference motion vectors of the co-located block. Furthermore, thetemporal direct vector calculation unit 114 generates a secondprediction vector (TVML1) that corresponds to a second reference picturelist of the current block, using a second reference motion vector thatcorresponds to the second picture list out of two reference motionvectors of the co-located block.

Here, in general, when the predictive motion vector index has a smallvalue, the required amount of information is small, and when thepredictive motion vector index has a large value, the required amount ofinformation is large. Accordingly, assigning a small predictive motionvector index to a motion vector which is highly likely to become a moreaccurate motion vector will increase the coding efficiency.

When the co-located block does not have two forward or backwardreference motion vectors, the temporal direct vector calculation unit114 determines, based on whether the co-located block is a forwardreference block or a backward reference block, a motion vector of theco-located block which is to be used in temporal direct.

When the co-located block is a backward reference block, the temporaldirect vector calculation unit 114 derives a candidate predictive motionvector (the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1) byway of temporal direct using a forward reference motion vector of theco-located block. It is to be noted that when the co-located block hasno forward reference motion vector, the temporal direct vectorcalculation unit 114 derives a candidate predictive motion vector (thetemporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1) by way oftemporal direct using a backward reference motion vector of theco-located block.

When the co-located block is a forward reference block, the temporaldirect vector calculation unit 114 derives a candidate predictive motionvector (the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1) byway of temporal direct using a backward reference motion vector of theco-located block. It is to be noted that when the co-located block hasno backward reference motion vector, the temporal direct vectorcalculation unit 114 derives a candidate predictive motion vector (thetemporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1) by way oftemporal direct using a forward reference motion vector of theco-located block.

Next, the inter prediction unit 110 codes the current picture based oninter prediction using the motion vector derived through motionestimation. Furthermore, the inter prediction control unit 112determines that the motion vector in each of the prediction directionsis coded using the predictive motion vector which has the smallest errorout of the candidate predictive motion vectors in the respectiveprediction directions. For example, the inter prediction control unit112 determines, as errors, values of difference between candidatepredictive motion vectors and the motion vector derived through motionestimation, and determines that one of the candidate predictive motionvectors which has the smallest error is used to code the motion vector.The variable-length coding unit 116 then performs the variable-lengthcoding on the predictive motion vector index which corresponds to theselected one of the candidate predictive motion vectors, and the errorinformation on the determined candidate predictive motion vector,together with the quantized coefficient and the like (S13).

FIG. 3A shows an example of the candidate predictive motion vector.Motion vectors MVL0_A and MVL1_A are a motion vector in the predictiondirection 0 and a motion vector in the prediction direction 1,respectively, of a neighboring block A located next to the left of thecurrent block. Motion vectors MVL0_B and MVL1_B are a motion vector inthe prediction direction 0 and a motion vector in the predictiondirection 1, respectively, of a neighboring block B immediately abovethe current block. A motion vector MVL0_C is a motion vector in theprediction direction 0 of a neighboring block C located next to theupper right of the current block. The neighboring blocks A and B use thebidirectional prediction while the neighboring block C uses theunidirectional prediction. Median (MVLX_A, MVLX_B, MVLX_C) of aprediction direction X (X=0, 1) indicates an intermediate value of themotion vectors MVLX_A, MVLX_B, and MVLX_C. Here, the intermediate valueis derived as follows, for example.

$\begin{matrix}\left\lbrack {{Math}.\mspace{14mu} 1} \right\rbrack & \; \\{{{Median}\left( {x,y,z} \right)} = {x + y + z - {{Min}\left( {x,{{Min}\left( {y,z} \right)}} \right)} - {{Max}\left( {x,{{Max}\left( {y,z} \right)}} \right)}}} & \left( {{Expression}\mspace{14mu} 1} \right) \\\left\lbrack {{Math}.\mspace{14mu} 2} \right\rbrack & \; \\{{{Min}\left( {x,y} \right)} = \left\{ \begin{matrix}x & \left( {x \leq y} \right) \\y & \left( {x > y} \right)\end{matrix} \right.} & \left( {{Expression}\mspace{14mu} 2} \right) \\\left\lbrack {{Math}.\mspace{14mu} 3} \right\rbrack & \; \\{{{Max}\left( {x,y} \right)} = \left\{ \begin{matrix}x & \left( {x \geq y} \right) \\y & \left( {x < y} \right)\end{matrix} \right.} & \left( {{Expression}\mspace{14mu} 3} \right)\end{matrix}$

The predictive motion vector index of the prediction direction 0 has avalue 0 for Median (MVL0_A, MVL0_B, MVL0_C), a value 1 for the motionvector MVL0_A, a value 2 for the motion vector MVL0_B, a value 3 for themotion vector MVL0_C, and a value 4 for the temporal direct vectorTMVL0. The predictive motion vector index of the prediction direction 1has a value 0 for Median (MVL1_A, MVL1_B, 0), a value 1 for the motionvector MVL1_A, a value 2 for the motion vector MVL1_B, and a value 3 forthe temporal direct vector TMVL1.

It is to be noted that the method of assigning predictive motion vectorindices is not limited to this example. For example, it is conceivablethat the assignment of the predictive motion vector indices may beswitched according to the reference direction of the motion vector ofthe co-located block. Specific examples are shown in FIGS. 3B to 3E.

FIG. 3B shows an example of the assignment of the predictive motionvector indices which is applied when the co-located block has two motionvectors both of which are forward reference motion vectors (hereinafterreferred to as “two forward reference motion vectors”) or backwardreference motion vectors (hereinafter referred to as “two backwardreference motion vectors”) and the reference direction of each of themotion vectors agrees with the direction toward the current pictureincluding the current block. In this case, there is a possibility thatthe temporal direct vector TMVLX in the prediction direction X,calculated from each of the motion vectors, is more accurate than othercandidate predictive motion vectors. The temporal direct vector TMVLX istherefore assigned with a smaller predictive motion vector index asshown in FIG. 3B.

FIG. 3C shows an example of the assignment of the predictive motionvector indices which is applied when the co-located block has two motionvectors both of which are forward or backward reference motion vectorsand the reference direction of each of the motion vectors is opposite tothe direction toward the current picture including the current block. Inthis case, rather than the temporal direct vector in the predictiondirection X, calculated from each of the motion vectors, other candidatepredictive motion vectors are assigned with smaller predictive motionvector indices.

FIG. 3D shows an example of the assignment of the predictive motionvector indices which is applied when the co-located block has a motionvector which is a forward or backward reference motion vector and thereference direction of the motion vector is the direction toward thecurrent picture including the current block. In this case, there is apossibility that the temporal direct vector in the prediction directionX, calculated from the motion vector, is more accurate than othercandidate predictive motion vectors. The temporal direct vector istherefore assigned with a smaller predictive motion vector index asshown in FIG. 3D.

FIG. 3E shows an example of the assignment of the predictive motionvector indices which is applied when the co-located block has a motionvector which is a forward or backward reference motion vector and thereference direction of the motion vector is opposite to the directiontoward the current picture including the current block. In this case,rather than the temporal direct vector in the prediction direction X,calculated from the motion vector, other candidate predictive motionvectors are assigned with smaller predictive motion vector indices.

As above, switching between different ways of assigning the predictivemotion vector indices according to the reference direction of the motionvector of the co-located block makes it possible to assign a smallpredictive motion vector index to a candidate prediction motion vectorwhich is likely to provide high prediction accuracy, so that the codingefficiency can be improved.

FIG. 4 shows an example of a code table which is used in the case ofperforming variable-length coding on the predictive motion vectorindices. In the example of FIG. 4, codes shorter in code length areassigned with the predictive motion vector indices in ascending order ofthe value thereof. Thus, assigning a small predictive motion vectorindex to a candidate predictive motion vector which is likely to providehigh prediction accuracy allows improvement in coding efficiency.

FIG. 5 shows a flow of determining a candidate predictive motion vectorin the inter prediction control unit 112. In the flow shown in FIG. 5,the inter prediction control unit 112 determines that, out of aplurality of candidate predictive motion vectors, a predictive motionvector which has the smallest error relative to the motion vector ineach of the prediction directions derived through motion estimation isto be used in coding of the motion vector in the prediction direction.The variable-length coding unit 116 performs variable-length coding onthe error information on the determined candidate predictive motionvector and the predictive motion vector index which indicates thedetermined predictive motion vector.

Specifically, first, the inter prediction control unit 112 initializesan index of candidate predictive motion vector mvp_idx and a minimummotion vector error (S21). Next, the inter prediction control unit 112compares the index of candidate predictive motion vector mvp_idx and thenumber of candidate predictive motion vectors (the number of records inthe table shown in FIG. 3) (S22).

When mvp_idx<the number of candidate predictive motion vectors (Yes inS22), the inter prediction control unit 112 calculates a motion vectorerror (error information) using one of the plurality of candidatepredictive motion vectors (S23). For example, the inter predictioncontrol unit 112 calculates the motion vector error by subtracting thepredictive motion vector assigned with the predictive motion vectorindex=0 in FIG. 3 from the motion vector used in coding of the currentblock.

Next, the inter prediction control unit 112 compares the motion vectorerror calculated in Step S23 with the minimum motion vector error (S24).When the motion vector error<the minimum motion vector error (Yes inS24), the inter prediction control unit 112 sets (overwrites), as (ontop of) the minimum motion vector error, the motion vector errorcalculated in Step S23, and sets (overwrites) the current mvp_idx as (ontop of) the predictive motion vector index (S25). When the motion vectorerror the minimum motion vector error (No in S24), Step S25 is skipped.

Subsequently, the inter prediction control unit 112 increments mvp_idxby 1 (S26) and repeatedly executes each of the above processes (StepsS22 to S26) the number of times equal to the number of candidatepredictive motion vectors. The inter prediction control unit 112 thenoutputs the values set as the minimum motion vector error and thepredictive motion vector index, to the variable-length coding unit 118at a point in time of mvp_idx=the number of candidate predictive motionvectors (S22), and brings the processing of FIG. 5 to the end (S27).

FIG. 6 shows in detail the flow of processing in Step S12 of FIG. 2. Thefollowing describes about FIG. 6.

First, the temporal direct vector calculation unit 114 determineswhether or not the co-located block has a reference motion vector (S31).When it is determined that the co-located block has a reference motionvector (Yes in S31), the temporal direct vector calculation unit 114determines whether or not the co-located block has two forward orbackward reference motion vectors (S32).

When it is determined that the co-located block has two forward orbackward reference motion vectors (Yes in S32), the temporal directvector calculation unit 114 derives the temporal direct vector TMVL0 inthe prediction direction 0 by way of temporal direct using the motionvector (mvL0) of the co-located block (S33). Furthermore, the temporaldirect vector calculation unit 114 derives the temporal direct vectorTMVL1 in the prediction direction 1 by way of temporal direct using themotion vector (mvL1) of the co-located block (S34). The temporal directvector calculation unit 114 then adds the temporal direct vectors TMVL0and TMVL1 to respective candidate predictive motion vectors in theprediction directions 0 and 1 (S35).

When it is determined that the co-located block does not have twoforward or backward reference motion vectors (No in S32), the temporaldirect vector calculation unit 114 determines whether or not theco-located block is a backward reference block (S36).

When it is determined that the co-located block is a backward referenceblock (Yes in S36), the temporal direct vector calculation unit 114determines whether or not the co-located block has a forward referencemotion vector (mvL0) (S37). When it is determined that the co-locatedblock has a forward reference motion vector (mvL0) (Yes in S37), thetemporal direct vector calculation unit 114 derives the temporal directvector TMVL0 in the prediction direction 0 and the temporal directvector TMVL1 in the prediction direction 1 by way of temporal directusing the forward reference motion vector (mvL0) (S38) and adds them tothe candidate predictive motion vectors in the prediction directions 0and 1 (S35).

When it is determined that the co-located block has no forward referencemotion vector (mvL0) (No in S37), the temporal direct vector calculationunit 114 derives the temporal direct vector TMVL0 in the predictiondirection 0 and the temporal direct vector TMVL1 in the predictiondirection 1 by way of temporal direct using the backward referencemotion vector (mvL1) of the co-located block (S39) and adds them to thecandidate predictive motion vectors in the prediction directions 0 and 1(S35).

When it is determined that the co-located block is not a backwardreference block, that is, the co-located block is a forward referenceblock (No in S36), the temporal direct vector calculation unit 114determines whether or not the co-located block has a backward referencemotion vector (mvL1) (S40).

When it is determined that the co-located block has a backward referencemotion vector (mvL1) (Yes in S40), the temporal direct vectorcalculation unit 114 derives the temporal direct vector TMVL0 in theprediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 by way of temporal direct using the backwardreference motion vector (mvL1) (S41) and adds them to the candidatepredictive motion vectors in the prediction directions 0 and 1 (S35).

When it is determined that the co-located block has no backwardreference motion vector (mvL1) (No in S40), the temporal direct vectorcalculation unit 114 derives the temporal direct vector TMVL0 in theprediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 by way of temporal direct using the forwardreference motion vector (mvL0) of the co-located block (S42) and addsthem to the candidate predictive motion vectors in the predictiondirections 0 and 1 (S35).

Furthermore, when it is determined that the co-located block has noreference motion vectors (mvL0, mvL1) (No in S31), the temporal directvector calculation unit 114 avoids the temporal direct-based derivationof a candidate predictive motion vector (S43).

Next, a method of deriving a motion vector by way of temporal direct isdescribed in detail.

FIG. 7A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block has twoforward reference motion vectors, namely, two forward reference motionvectors mvL0 and mvL1. In the case of FIG. 7A, the temporal directvector calculation unit 114 derives the temporal direct vector TMVL0 inthe prediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 by way of temporal direct using the respectivemotion vectors. Specifically, the temporal direct vector calculationunit 114 derives the temporal direct vector TMVL0 in the predictiondirection 0 and the temporal direct vector TMVL1 in the predictiondirection 1 according to the following Expression 4 and Expression 5.

TMVL0=mvL0×(B8−B4)/(B4−B2)  (Expression 4)

TMVL1=mvL1×(B8−B4)/(B4−B0)  (Expression 5)

Here, (B4-B2) represents information on a difference in display timebetween the picture B4 and the picture B2. (B4-B0) representsinformation on a difference in display time between the picture B4 andthe picture B0. (B8-B4) represents information on a difference indisplay time between the picture B8 and the picture B4.

FIG. 7B shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block has twobackward reference motion vectors, namely, two backward reference motionvectors mvL0 and mvL1. In the case of FIG. 7B, the temporal directvector calculation unit 114 derives the temporal direct vector TMVL0 inthe prediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 by way of temporal direct using the respectivemotion vectors. Specifically, the temporal direct vector calculationunit 114 derives the temporal direct vector TMVL0 in the predictiondirection 0 and the temporal direct vector TMVL1 in the predictiondirection 1 according to the following Expression 6 and Expression 7.

TMVL0=mvL0×(B2−B0)/(B4−B2)  (Expression 6)

TMVL1=mvL1×(B2−B0)/(B8−B2)  (Expression 7)

Here, (B4-B2) represents information on a difference in display timebetween the picture B4 and the picture B2. (B8-B2) representsinformation on a difference in display time between the picture B8 andthe picture B2. (B2-B0) represents information on a difference indisplay time between the picture B2 and the picture B0.

FIG. 8A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block is abackward reference block and has both a forward reference motion vectorand a backward reference motion vector. In the case of FIG. 8A, thetemporal direct vector calculation unit 114 derives the temporal directvector TMVL0 in the prediction direction 0 and the temporal directvector TMVL1 in the prediction direction 1 by way of temporal directusing the forward reference motion vector. Specifically, the temporaldirect vector calculation unit 114 derives, using the forward referencemotion vector, the temporal direct vector TMVL0 in the predictiondirection 0 and the temporal direct vector TMVL1 in the predictiondirection 1 according to the following Expression 8 and Expression 9.

TMVL0=mvL0×(B2−B0)/(B4−B0)  (Expression 8)

TMVL1=mvL0×(B2−B4)/(B4−B0)  (Expression 9)

Here, (B2-B0) represents information on a difference in display timebetween the picture B2 and the picture B0. (B2-B4) representsinformation on a difference in display time between the picture B2 andthe picture B4. (B4-B0) represents information on a difference indisplay time between the picture B4 and the picture B0.

FIG. 8B shows an example of calculating a temporal direct vector, whichis applied in the case where the co-located block is a backwardreference block and has a backward reference motion vector only. In thecase of FIG. 8B, the temporal direct vector calculation unit 114 derivesthe temporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1 by way oftemporal direct using the backward reference motion vector.Specifically, the temporal direct vector calculation unit 114 derives,using the backward reference motion vector, the temporal direct vectorTMVL0 in the prediction direction 0 and the temporal direct vector TMVL1in the prediction direction 1 according to the following Expression 10and Expression 11.

TMVL0=mvL1×(B2−B0)/(B4−B8)  (Expression 10)

TMVL1=mvL1×(B2−B4)/(B4−B8)  (Expression 11)

Here, (B2-B0) represents information on a difference in display timebetween the picture B2 and the picture B0. (B2-B4) representsinformation on a difference in display time between the picture B2 andthe picture B4. (B4-B8) represents information on a difference indisplay time between the picture B4 and the picture B8.

FIG. 9A shows an example of a method of calculating a temporal directvector, which is applied in the case where the co-located block is aforward reference block and has both a forward reference motion vectorand a backward reference motion vector. In the case of FIG. 9A, thetemporal direct vector calculation unit 114 derives the temporal directvector TMVL0 in the prediction direction 0 and the temporal directvector TMVL1 in the prediction direction 1 by way of temporal directusing the backward reference motion vector. Specifically, the temporaldirect vector calculation unit 114 derives, using the backward referencemotion vector, a candidate predictive motion vector according to thefollowing Expression 12 and Expression 13.

TMVL0=mvL1×(B6−B8)/(B4−B8)  (Expression 12)

TMVL1=mvL1×(B6−B4)/(B4−B8)  (Expression 13)

Here, (B6-B8) represents information on a difference in display timebetween the picture B6 and the picture B8. (B6-B4) representsinformation on a difference in display time between the picture B6 andthe picture B4. (B4-B8) represents information on a difference indisplay time between the picture B4 and the picture B8.

FIG. 9B shows an example of calculating a temporal direct vector, whichis applied in the case where the co-located block is a forward referenceblock and has a forward reference motion vector only. In the case ofFIG. 9B, the temporal direct vector calculation unit 114 derives thetemporal direct vector TMVL0 in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1 by way oftemporal direct using the forward reference motion vector. Specifically,the temporal direct vector calculation unit 114 derives, using thebackward reference motion vector, a candidate predictive motion vectoraccording to the following Expression 14 and Expression 15.

TMVL0=mvL0×(B6−B8)/(B4−B0)  (Expression 14)

TMVL1=mvL0×(B6−B4)/(B4−B0)  (Expression 15)

Here, (B6-B8) represents information on a difference in display timebetween the picture B6 and the picture B8. (B6-B4) representsinformation on a difference in display time between the picture B6 andthe picture B4. (B4-B0) represents information on a difference indisplay time between the picture B4 and the picture B0.

As above, Embodiment 1 of the present invention uses, at the time ofcoding a motion vector, a predictive motion vector which has thesmallest error value out of a plurality of candidate predictive motionvectors, with the result that the coding efficiency can be improved. Forexample, the error value is a value of difference between a motionvector derived through motion estimation and a selected predictivemotion vector.

Furthermore, in Embodiment 1, a reference motion vector of theco-located block to be used in temporal direct is selected according tothe position of the co-located block and the number of reference motionvectors of the co-located block. This makes it possible to narrow downcandidate predictive motion vectors to accurate ones and therebypossible to reduce the processing load for coding and decoding.

Specifically, when the co-located block has two forward or backwardreference motion vectors, it is likely that the motion vector of thecurrent block and the motion vector of the co-located block areapproximate in the same prediction direction. Accordingly, calculating atemporal direct vector in each of the prediction directions from themotion vector of the co-located block in the same prediction directionallows improvement in the coding efficiency. More specifically, thetemporal direct vector TMVL0 in the prediction direction 0 is calculatedin temporal direct from the motion vector mvL0 of the co-located blockin the prediction direction 0, and the temporal direct vector TMVL1 inthe prediction direction 1 is calculated in temporal direct from themotion vector mvL1 of the co-located block in the prediction direction1.

When the co-located block has both a forward reference motion vector anda backward reference motion vector, a motion vector to be used forcalculation of each of the temporal direct vector TMVL0 in theprediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 is selected according to the position of theco-located block.

For example, when the co-located block is a backward reference block, aforward reference motion vector is used. Specifically, this is becausethe forward reference motion vector is a motion vector directed from apicture including the co-located block toward the current pictureincluding the current block, which is likely to have a smallerprediction error than a backward reference motion vector. When theco-located block is a forward reference block, a backward referencemotion vector is used. Specifically, this is because the backwardreference motion vector is a motion vector directed from the pictureincluding the co-located block toward the current picture including thecurrent block, which is likely to have a smaller prediction error than aforward reference motion vector.

It is to be noted that although it is determined in this Embodiment 1whether or not the co-located block has two forward or backwardreference motion vectors, it may also be possible to further determinethe position of the co-located block at the same time. Specifically, inStep S32 in FIG. 6, it is determined whether the co-located block hastwo forward reference motion vectors when the co-located block is aforward reference block or whether the co-located block has two backwardreference motion vectors when the co-located block is a backwardreference block.

When the co-located block is a backward reference block, the backwardreference motion vector is a motion vector which extends toward apicture located opposite the picture including the current block acrossthe picture including the co-located block, with the result that theprediction accuracy may be reduced. In such a case, the temporal directvector calculation unit 114 calculates, in temporal direct, the temporaldirect vector TMVL0 in the prediction direction 0 from the motion vectormvL0 in the prediction direction 0, and calculates, in temporal direct,the temporal direct vector TMVL1 in the prediction direction 1 from themotion vector mvL1 in the prediction direction 1. This makes it possibleto increase the prediction accuracy and reduce the processing load atthe same time.

Furthermore, in Step S43 in FIG. 6, when the co-located block has noreference motion vector, no temporal direct vector is calculated.However, it is possible to calculate a temporal direct vector by usinganother block as the co-located block.

For example, when the co-located block is a backward reference block andhas no reference motion vector, it is conceivable to use a forwardreference block as the co-located block. In this case, the use of abackward reference motion vector out of the reference motion vectors ofthe forward reference block allows improvement in the predictionaccuracy. Furthermore, when the forward reference block has no backwardreference motion vector, the use of a forward reference motion vectorallows a temporal direct vector to be derived.

When the co-located block is a forward reference block and has noreference motion vector, it is conceivable to use a backward referenceblock as the co-located block. In this case, the use of a forwardreference motion vector out of the reference motion vectors of thebackward reference block allows improvement in the prediction accuracy.Furthermore, when the backward reference block has no forward referencemotion vector, the use of a backward reference motion vector allows atemporal direct vector to be derived.

For example, when the co-located block is a block within a pictureassigned with an index 0 in the reference picture list L0 of the currentpicture and the co-located block specified by the index 0 in thereference picture list L0 has no reference motion vector, it isconceivable to use a reference motion vector of a co-located blockspecified by an index 0 in the reference picture list L1.

Furthermore, although this Embodiment 1 has described the method ofcalculating a temporal direct vector in which a motion vector derivedthrough motion estimation is used as one of the candidate predictivemotion vectors to be used at the time of coding, the present inventionis not always limited to this embodiment. For example, as a coding modefor inter prediction of the current block in a B-picture or a P-picturein H. 264, there are a direct mode in which only a difference value ofimage data is coded and a motion vector is predicted based on aperipheral block or the like, and a skip mode in which no differencevalue of image data and no motion vector are coded and a predicted imageat a position indicated by a motion vector predicted based on aperipheral block or the like is provided directly as a coded image. Alsoin these direct mode and skip mode, a temporal direct vector calculatedby the same or like method can be applied as one of the predictivemotion vectors.

Furthermore, as an inter prediction mode for the current block in aB-picture or a P-picture, there is a merge mode in which a motion vectorand a reference picture index are copied from a neighboring block or aco-located block of the current block to code the current block. In themerge mode, the index of the neighboring block or the like used for thecopying is added to a bit stream, which allows a motion vector and areference picture index to be selected. Also in such merge mode, atemporal direct vector calculated by the same or like method can beapplied as a predictive motion vector of the co-located block.

Furthermore, although, using the co-located reference direction flag,either the forward reference block or the backward reference block isselected as a co-located block to calculate a temporal direct vector inthis Embodiment 1, the present invention is not always limited to thisembodiment. For example, the forward reference block is defined as aco-located block 1, and the backward reference block is defined as aco-located block 2. It may then be possible that according to thedirection of a reference motion vector or the number of reference motionvectors of each of the co-located block 1 and the co-located block 2, atemporal direct vector is calculated and added to the candidatepredictive motion vectors. The use of both the co-located blocks whichare the forward reference block and the backward reference block asabove allows improvement in the accuracy for a temporal direct vectorand thereby allows improvement in the coding efficiency.

Furthermore, in Embodiment 1, when the co-located block has two forwardor backward reference motion vectors, the temporal direct vector TMVL0in the prediction direction 0 is calculated in temporal direct from themotion vector mvL0 of the co-located block in the prediction direction0, and the temporal direct vector TMVL1 in the prediction direction 1 iscalculated in temporal direct from the motion vector mvL1 of theco-located block in the prediction direction 1. The temporal directvectors TMVL0 and TVML1 are then added to the candidate predictivemotion vectors in the respective prediction directions, but the presentinvention is not always limited to this embodiment. For example, it maybe possible that both the calculated temporal direct vectors TMVL0 andTVML1 are added to the candidate predictive motion vectors in each ofthe prediction directions. This allows improvement in the accuracy ofcandidate predictive motion vectors and thereby allows improvement inthe coding efficiency.

Embodiment 2

In this Embodiment 2, Step S52 is different from Step S32 inEmbodiment 1. The following descriptions focus on the differences fromEmbodiment 1.

In Step S52 of FIG. 10, it is determined whether reference pictures inthe reference lists L0 and L1 of a coded picture are assigned withreference picture indices in the same way. Generally, in the referencelist L1, pictures located after the current picture in display timeorder are assigned with reference picture indices. Meanwhile, in thereference list L0, pictures located before the current picture indisplay time order are assigned with reference picture indices.Accordingly, when the reference pictures in the reference lists L1 andL0 of a coded picture are assigned with reference picture indices in thesame way, the reference direction is limited to either one of theforward and backward directions in display order from the currentpicture.

More specifically, when it is determined that the reference pictures inthe reference lists L0 and L1 of a coded picture are assigned withreference picture indices in the same way (Yes in S52), the temporaldirect vector calculation unit 114 derives the temporal direct vectorTMVL0 in the prediction direction 0 and the temporal direct vector TMVL1in the prediction direction 1 by way of temporal direct using thereference motion vectors mvL0 and mvL1 of a co-located block (S53, S54).

It is likely that the motion vector of the current block and the motionvector of the co-located block are approximate in the same predictiondirection. Accordingly, calculating a temporal direct vector in each ofthe prediction directions from the motion vector of the co-located blockin the same prediction direction allows improvement in the codingefficiency. More specifically, the temporal direct vector calculationunit 114 calculates, in temporal direct, the temporal direct vectorTMVL0 in the prediction direction 0 from the motion vector mvL0 of theco-located block in the prediction direction 0, and calculates, intemporal direct, the temporal direct vector TMVL1 in the predictiondirection 1 from the motion vector mvL1 of the co-located block in theprediction direction 1.

When the co-located block has only one of the reference motion vectorsmvL0 and mvL1 (No in S52), the temporal direct vector calculation unit114 derives the temporal direct vector TMVL0 in the prediction direction0 and the temporal direct vector TMVL 1 in the prediction direction 1 byway of temporal direct using only one of the reference motion vectorsmvL0 and mvL1 (S56 to S62). Processing subsequent to Step S56 is thesame as Steps S36 to S42 of Embodiment 1 and therefore not described.

Thus, in Embodiment 2 of the present invention, the processing load forcoding and decoding is reduced by making determinations based on thereference lists. Since the reference lists are held by each picture, thedetermination is made per picture. This means that the determination perblock is no longer necessary, which allows a reduction in the processingload.

It is to be noted that although the temporal direct vector TMVL0 in theprediction direction 0 is calculated in temporal direct from the motionvector mvL0 of a co-located block in the prediction direction 0 and thetemporal direct vector TMVL1 in the prediction direction 1 is calculatedin temporal direct from the motion vector mvL1 in the predictiondirection 1 when the reference pictures in the reference lists L0 and L1are assigned with reference picture indices in the same way in thisEmbodiment 2, the present invention is not limited to this embodiment.

For example, it may be possible that when reference pictures in thereference lists L0 and L1 of a reference picture including a co-locatedblock are assigned with reference picture indices in the same way, thetemporal direct vector TMVL0 in the prediction direction 0 is calculatedin temporal direct from the motion vector mvL0 of the co-located blockin the prediction direction 0, and the temporal direct vector TMVL1 inthe prediction direction 1 is calculated in temporal direct from themotion vector mvL1 of the co-located block in the prediction direction1.

As yet another example, it may also be possible that when all thereference pictures held in the reference lists L0 and L1 of a codedpicture are located before the current picture in display order orlocated after the current picture in display order, the temporal directvector TMVL0 in the prediction direction 0 is calculated in temporaldirect from the motion vector mvL0 of the co-located block in theprediction direction 0, and the temporal direct vector TVML1 in theprediction direction 1 is calculated in temporal direct from the motionvector mvL1 of the co-located block in the prediction direction 1.

Embodiment 3

Next, with reference to FIGS. 11 and 12, a moving picture decodingmethod and a moving picture decoding apparatus according to Embodiment 3are described. Detailed descriptions in common with Embodiment 1 areomitted while the differences from Embodiment 1 are mainly described.

FIG. 11 is a block diagram showing a moving picture decoding apparatusaccording to Embodiment 3 of the present invention.

In Embodiment 3, a block included in a picture which is located, indisplay time order, before a current picture to be decoded is referredto as a forward reference block. A block included in a picture which islocated after the current picture in display time order is referred toas a backward reference block.

A moving picture decoding apparatus 200 includes, as shown in FIG. 11, avariable-length decoding unit 201, an inverse quantization unit 202, aninverse orthogonal transform unit 203, an adding unit 204, a blockmemory 205, a frame memory 206, an intra prediction unit 207, an interprediction unit 208, a switch 209, an inter prediction control unit 210,and a temporal direct vector calculation unit 211. This moving picturedecoding apparatus 200 decodes a bit stream, for example, output fromthe moving picture coding apparatus 100 according to Embodiment 1.

The variable-length decoding unit 201 performs variable-length decodingon the received bit stream, outputs quantized coefficients to theinverse quantization unit 202, outputs picture type information to theswitch 209 and the inter prediction control unit 210, outputs apredictive motion vector index to the inter prediction control unit 210,and outputs a co-located reference direction flag to the temporal directvector calculation unit 211.

The inverse quantization unit 202 reconstructs a transform coefficientby inversely quantizing the quantized coefficient obtained from thevariable-length decoding unit 201 and outputs the reconstructedtransform coefficient to the inverse orthogonal transform unit 203. Theinverse orthogonal transform unit 203 reconstructs a residual block bytransforming, from the frequency domain to the image domain, thereconstructed transform coefficient obtained from the inversequantization unit 202, and outputs the reconstructed residual block tothe adding unit 204.

The adding unit 204 reconstructs a decoded block by adding thereconstructed residual block obtained from the inverse orthogonaltransform unit 203 and a prediction block obtained from the switch 209.The adding unit 204 then outputs, to the outside of the apparatus, adecoded picture sequence including the decoded block reconstructed asabove and stores the decoded picture sequence into the block memory 205and the frame memory 206. The block memory 205 stores, per block, thedecoded picture sequence obtained from the adding unit 204. The framememory 206 stores, per frame, the decoded picture sequence obtained fromthe adding unit 204.

The intra prediction unit 207 performs intra prediction using thedecoded block-by-block picture sequence stored in the block memory 205,to generate a prediction block of the current block and outputs thegenerated prediction block to the switch 209. The inter prediction unit208 performs inter prediction using the decoded frame-by-frame picturesequence stored in the frame memory 206, to generate a prediction blockof the current block and outputs the generated prediction block to theswitch. The switch 209 outputs, to the adding unit 204, the predictionblock generated by the intra prediction unit 207 or the prediction blockgenerated by the inter prediction unit 208.

The temporal direct vector calculation unit 211 derives a candidatepredictive motion vector by way of temporal direct using the co-locatedreference direction flag obtained from the variable-length decoding unit201. Specifically, when the co-located block identified by theco-located reference direction flag has two forward or backwardreference motion vectors, the temporal direct vector calculation unit211 derives the temporal direct vector TMVL0 in the prediction direction0 and the temporal direct vector TMVL1 in the prediction direction 1 byway of temporal direct using the two motion vectors of the co-locatedblock. Furthermore, the temporal direct vector calculation unit 211assigns each of the temporal direct vectors in the respective predictiondirections with a value of a corresponding predictive motion vectorindex.

When the co-located block identified by the co-located referencedirection flag does not have two forward or backward reference motionvectors, the temporal direct vector calculation unit 211 determines,based on whether the co-located block is a forward reference block or abackward reference block, a motion vector of the co-located block whichis to be used in temporal direct.

Specifically, when the co-located block is a backward reference block,the temporal direct vector calculation unit 211 derives the temporaldirect vector TMVL0 in the prediction direction 0 and the temporaldirect vector TMVL1 in the prediction direction 1 by way of temporaldirect using a forward reference motion vector of the co-located block.It is to be noted that when the co-located block has no forwardreference motion vector, the temporal direct vector calculation unit 211derives the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1 byway of temporal direct using a backward reference motion vector of theco-located block.

When the co-located block is a forward reference block, the temporaldirect vector calculation unit 211 derives the temporal direct vectorTMVL0 in the prediction direction 0 and the temporal direct vector TMVL1in the prediction direction 1 by way of temporal direct using a backwardreference motion vector of the co-located block. It is to be noted thatwhen the co-located block has no backward reference motion vector, thetemporal direct vector calculation unit 211 derives the temporal directvector TMVL0 in the prediction direction 0 and the temporal directvector TMVL1 in the prediction direction 1 by way of temporal directusing a forward reference motion vector of the co-located block.

The inter prediction control unit 208 specifies, out of a plurality ofcandidate predictive motion vectors, a predictive motion vector whichcorresponds to the predictive motion vector index obtained from thevariable-length decoding unit 201. The inter prediction control unit 210then adds, to the specified predictive motion vector, error informationon the predictive motion vector relative to the motion vector, tothereby calculate a motion vector which is to be used for interprediction.

FIG. 12 shows an outline of a processing flow of the moving picturedecoding method according to Embodiment 3 of the present invention.

First, the variable-length decoding unit 201 performs variable-lengthdecoding on the co-located reference direction flag per picture (S71).The variable-length decoding unit 201 then outputs the decodedco-located reference direction flag to the temporal direct vectorcalculation unit 211.

Next, the temporal direct vector calculation unit 211 determines, basedon the decoded co-located reference direction flag, whether a forwardreference block is to be a co-located block or a backward referenceblock is to be a co-located block. Furthermore, the temporal directvector calculation unit 211 derives a temporal direct vector by way oftemporal direct using a reference motion vector of the co-located block.The temporal direct vector calculation unit 211 then outputs, as acandidate predictive motion vector, the derived temporal direct vectorto the inter prediction control unit 210 (S72).

Specifically, when the co-located block has two forward or backwardreference motion vectors, the temporal direct vector calculation unit211 derives the temporal direct vector TMVL0 in the prediction direction0 and the temporal direct vector TMVL1 in the prediction direction 1 byway of temporal direct using the two motion vectors of the co-locatedblock. Furthermore, the temporal direct vector calculation unit 211assigns each of the temporal direct vectors in the respective predictiondirections with a value of a corresponding predictive motion vectorindex. The predictive motion vector indices are assigned according tothe method of assigning predictive motion vector indices in Embodiment1.

When the co-located block does not have two forward or backwardreference motion vectors, the temporal direct vector calculation unit211 determines, based on whether the co-located block is a forwardreference block or a backward reference block, a motion vector of theco-located block which is to be used in temporal direct.

Specifically, when the co-located block is a backward reference block,the temporal direct vector calculation unit 211 derives the temporaldirect vector TMVL0 in the prediction direction 0 and the temporaldirect vector TMVL1 in the prediction direction 1 by way of temporaldirect using a forward reference motion vector of the co-located block.It is to be noted that when the co-located block has no forwardreference motion vector, the temporal direct vector calculation unit 211derives the temporal direct vector TMVL0 in the prediction direction 0and the temporal direct vector TMVL1 in the prediction direction 1 byway of temporal direct using a backward reference motion vector.

When the co-located block is a forward reference block, the temporaldirect vector calculation unit 211 derives the temporal direct vectorTMVL0 in the prediction direction 0 and the temporal direct vector TMVL1in the prediction direction 1 by way of temporal direct using a backwardreference motion vector of the co-located block. It is to be noted thatwhen the co-located block has no backward reference motion vector, thetemporal direct vector calculation unit 211 derives the temporal directvector TMVL0 in the prediction direction 0 and the temporal directvector TMVL1 in the prediction direction 1 by way of temporal directusing a forward reference motion vector.

Next, the inter prediction control unit 210 determines, out of aplurality of candidate predictive motion vectors, a motion vector whichis used for inter prediction, based on the predictive motion vectorindex obtained from the variable-length decoding unit 201. Furthermore,the inter prediction control unit adds the error information to thedetermined predictive motion vector, derives a motion vector, andoutputs the derived motion vector to the inter prediction unit 208(S73). The inter prediction unit 208 performs inter prediction using amotion vector obtained from the inter prediction control unit 210.

As above, in Embodiment 3 of the present invention, the motion vectormost suitable for the current block can be selected, which allows a bitstream compressed with high efficiency to be appropriately decoded.

Furthermore, a reference motion vector of the co-located block which isto be used in temporal direct is selected according to the position ofthe co-located block and the number of reference motion vectors of theco-located block, which makes it possible to narrow down candidatepredictive motion vectors to accurate ones and thereby possible toreduce the processing load.

Specifically, when the co-located block has two forward or backwardreference motion vectors, it is likely that the motion vector of thecurrent block and the motion vector of the co-located block areapproximate in the same prediction direction. Accordingly, calculating atemporal direct vector in each of the prediction directions from themotion vector of the co-located block in the same prediction directionallows improvement in the coding efficiency. More specifically, thetemporal direct vector calculation unit 211 calculates, in temporaldirect, the temporal direct vector TMVL0 in the prediction direction 0from the motion vector mvL0 of the co-located block in the predictiondirection 0, and calculates, in temporal direct, the temporal directvector TMVL1 in the prediction direction 1 from the motion vector mvL1in the prediction direction 1.

When the co-located block has both a forward reference motion vector anda backward reference motion vector, a motion vector to be used forcalculation of each of the temporal direct vector TMVL0 in theprediction direction 0 and the temporal direct vector TMVL1 in theprediction direction 1 is selected according to the position of theco-located block.

For example, when the co-located block is a backward reference block, aforward reference motion vector is used. This is because the forwardreference motion vector is a motion vector directed from a pictureincluding the co-located block toward a picture including the currentblock, which is likely to have a smaller prediction error than abackward reference motion vector. When the co-located block is a forwardreference block, a backward reference motion vector is used. This isbecause the backward reference motion vector is a motion vector directedfrom the picture including the co-located block toward the currentpicture including the current block, which is likely to have a smallerprediction error than a forward reference motion vector.

Furthermore, instead of determining whether the co-located block has twoforward or backward reference motion vectors, it may be possible todetermine whether the reference pictures in the reference lists L0 andL1 are assigned with reference picture indices in the same way.Generally, in the reference list L1, pictures located after the currentpicture in display time order are assigned with reference pictureindices. Meanwhile, in the reference list L0, pictures located beforethe current picture in display time order are assigned with referencepicture indices.

Accordingly, when the reference pictures in the reference lists L1 andL0 are assigned with reference picture indices in the same way, thereference direction is limited to either one of the forward and backwarddirections in display order from the current picture. Thus, thedetermination based on the reference lists allows a reduction in theprocessing load. Since the reference lists are held by each picture, itis sufficient that the determination is made per picture, with theresult that the determination per block is no longer necessary.

As yet another example, it may also be possible that when all thereference pictures held in the reference lists L0 and L1 of a decodedpicture are located before the current picture in display order orlocated after the current picture in display order, the temporal directvector TMVL0 in the prediction direction 0 is calculated in temporaldirect from the motion vector mvL0 of the co-located block in theprediction direction 0, and the temporal direct vector TVML1 in theprediction direction 1 is calculated in temporal direct from the motionvector mvL1 of the co-located block in the prediction direction 1.

Although no temporal direct vector is calculated when the co-locateblock has no reference motion vector in the above description, it ispossible to calculate a temporal direct vector by using another block asthe co-located block.

For example, when the co-located block is a backward reference block andhas no reference motion vector, it is conceivable to use a forwardreference block as the co-located block. In this case, the use of abackward reference motion vector out of the reference motion vectors ofthe forward reference block allows improvement in the predictionaccuracy. When the forward reference block has no backward referencemotion vector, the use of a forward reference motion vector allows atemporal direct vector to be derived.

When the co-located block is a forward reference block and has noreference motion vector, it is conceivable to use a backward referenceblock as the co-located block. In this case, the use of a forwardreference motion vector out of the reference motion vectors of thebackward reference block allows improvement in the prediction accuracy.When the backward reference block has no forward reference motionvector, the use of a backward reference motion vector allows a temporaldirect vector to be derived.

For example, when the co-located block is a block within a pictureassigned with an index 0 in the reference picture list L0 of the currentpicture and the co-located block specified by the index 0 in thereference picture list L0 has no reference motion vector, it isconceivable to use a reference motion vector of a co-located blockspecified by an index 0 in the reference picture list L1.

Furthermore, although this Embodiment 3 has described a method ofcalculating a temporal direct vector in which a motion vector derivedthrough motion estimation is used as one of the candidate predictivemotion vectors to be used at the time of decoding, the present inventionis not always limited to this embodiment. For example, as a decodingmode for inter prediction of the current block in a B-picture or aP-picture in H. 264, there are a direct mode in which only a differencevalue of image data is decoded and a motion vector is predicted based ona peripheral block or the like, and a skip mode in which no differencevalue of image data and no motion vector are decoded and a predictedimage at a position indicated by a motion vector predicted based on aperipheral block or the like is provided directly as a decoded image.Also in these direct mode and skip mode, a temporal direct vectorcalculated by the same or like method can be applied as one of thecandidate predictive motion vectors.

Furthermore, as an inter prediction mode for the current block in aB-picture or a P-picture, there is a merge mode in which a motion vectorand a reference picture index are copied from a neighboring block or aco-located block of the current block to decode the current block. Inthe merge mode, the index of the neighboring block or the like used forthe copying is added to a bit stream, which allows a motion vector and areference picture index to be selected. Also in such merge mode, atemporal direct vector calculated by the same or like method can beapplied as a predictive motion vector of the co-located block.

Embodiment 4

The processing described in each of Embodiments can be simplyimplemented in an independent computer system, by recording, in arecording medium, a program for implementing the configuration of themoving picture coding method (the image coding method) or the movingpicture decoding method (the image decoding method) described in theembodiment. The recording media may be any recording media as long asthe program can be recorded, such as a magnetic disk, an optical disk, amagnetic optical disk, an IC card, and a semiconductor memory.

Hereinafter, the applications to the moving picture coding method (theimage coding method) and the moving picture decoding method (the imagedecoding method) described in Embodiments and systems using them will bedescribed. This system is characterized by including an image coding anddecoding apparatus composed of the image coding apparatus using theimage coding method and the image decoding apparatus using the imagedecoding method. The other structure of the system can be appropriatelychanged depending on situations.

FIG. 15 illustrates an overall configuration of a content providingsystem ex100 for implementing content distribution services. The areafor providing communication services is divided into cells of desiredsize, and base stations ex107, ex108, ex109, and ex110 which are fixedwireless stations are placed in each of the cells.

The content providing system ex100 is connected to devices, such as acomputer ex111, a personal digital assistant (PDA) ex112, a cameraex113, a cellular phone ex114 and a game machine ex115, via the Internetex101, an Internet service provider ex102, a telephone network ex104, aswell as the base stations ex106 to ex110, respectively.

However, the configuration of the content providing system ex100 is notlimited to the configuration shown in FIG. 15, and a combination inwhich any of the elements are connected is acceptable. In addition, eachdevice may be directly connected to the telephone network ex104, ratherthan via the base stations ex106 to ex110 which are the fixed wirelessstations. Furthermore, the devices may be interconnected to each othervia a short distance wireless communication and others.

The camera ex113, such as a digital video camera, is capable ofcapturing video. A camera ex116, such as a digital video camera, iscapable of capturing both still images and video. Furthermore, thecellular phone ex114 may be the one that meets any of the standards suchas Global System for Mobile Communications (GSM) (registered trademark),Code Division Multiple Access (CDMA), Wideband-Code Division MultipleAccess (W-CDMA), Long Term Evolution (LTE), and High Speed Packet Access(HSPA). Alternatively, the cellular phone ex114 may be a PersonalHandyphone System (PHS).

In the content providing system ex100, a streaming server ex103 isconnected to the camera ex113 and others via the telephone network ex104and the base station ex109, which enables distribution of images of alive show and others. In such a distribution, a content (for example,video of a music live show) captured by the user using the camera ex113is coded as described above in Embodiments (that is, the systemfunctions as the image coding apparatus according to an implementationof the present invention), and the coded content is transmitted to thestreaming server ex103. On the other hand, the streaming server ex103carries out stream distribution of the transmitted content data to theclients upon their requests. The clients include the computer ex111, thePDA ex112, the camera ex113, the cellular phone ex114, and the gamemachine ex115 that are capable of decoding the above-mentioned codeddata. Each of the devices that have received the distributed datadecodes and reproduces the received data (that is, the system functionsas the image decoding apparatus according to the implementation of thepresent invention).

The captured data may be coded by the camera ex113 or the streamingserver ex103 that transmits the data, or the coding processes may beshared between the camera ex113 and the streaming server ex103.Similarly, the distributed data may be decoded by the clients or thestreaming server ex103, or the decoding processes may be shared betweenthe clients and the streaming server ex103. Furthermore, the data of thestill images and video captured by not only the camera ex113 but alsothe camera ex116 may be transmitted to the streaming server ex103through the computer ex111. The coding processes may be performed by thecamera ex116, the computer ex111, or the streaming server ex103, orshared among them.

Furthermore, the coding and decoding processes may be performed by anLSI ex500 generally included in each of the computer ex111 and thedevices. The LSI ex500 may be configured of a single chip or a pluralityof chips. Software for coding and decoding video may be synthesized intosome type of a recording medium (such as a CD-ROM, a flexible disk, anda hard disk) that is readable by the computer ex111 and others, and thecoding and decoding processes may be performed using the software.Furthermore, when the cellular phone ex114 is equipped with a camera,the image data obtained by the camera may be transmitted. The video datais data coded by the LSI ex500 included in the cellular phone ex114.

Furthermore, the streaming server ex103 may be composed of servers andcomputers, and may decentralize data and process the decentralized data,record, or distribute data.

As described above, the clients may receive and reproduce the coded datain the content providing system ex100. In other words, the clients canreceive and decode information transmitted by the user, and reproducethe decoded data in real time in the content providing system ex100, sothat the user who does not have any particular right and equipment canimplement personal broadcasting.

Aside from the example of the content providing system ex100, at leastone of the moving picture coding apparatus (the image coding apparatus)and the moving picture decoding apparatus (the image decoding apparatus)described in each of Embodiments may be implemented in a digitalbroadcasting system ex200 illustrated in FIG. 16. More specifically, abroadcast station ex201 communicates or transmits, via radio waves to abroadcast satellite ex202, multiplexed data obtained by multiplexingaudio data and others onto video data. The video data is data coded bythe moving picture coding method described in each of Embodiments (thatis, the video data is data coded by the image coding apparatus accordingto an implementation of the present invention). Upon receipt of themultiplexed data, the broadcast satellite ex202 transmits radio wavesfor broadcasting. Then, a home-use antenna ex204 with a satellitebroadcast reception function receives the radio waves. Next, a devicesuch as a television (receiver) ex300 and a set top box (STB) ex217decodes the received multiplexed data, and reproduces the decoded data(that is, the system functions as the image decoding apparatus accordingto an implementation of the present invention).

Furthermore, a reader/recorder ex218 (i) reads and decodes themultiplexed data recorded on a recording media ex215, such as a DVD anda BD, or (ii) codes video signals in the recording medium ex215, and insome cases, writes data obtained by multiplexing an audio signal on thecoded data. The reader/recorder ex218 can include the moving picturedecoding apparatus or the moving picture coding apparatus as shown ineach of Embodiments. In this case, the reproduced video signals aredisplayed on the monitor ex219, and can be reproduced by another deviceor system using the recording medium ex215 on which the multiplexed datais recorded. It is also possible to implement the moving picturedecoding apparatus in the set top box ex217 connected to the cable ex203for a cable television or to the antenna ex204 for satellite and/orterrestrial broadcasting, so as to display the video signals on themonitor ex219 of the television ex300. The moving picture decodingapparatus may be implemented not in the set top box but in thetelevision ex300.

FIG. 17 illustrates the television (receiver) ex300 that uses the movingpicture coding method and the moving picture decoding method describedin each of Embodiments. The television ex300 includes: a tuner ex301that obtains or provides multiplexed data obtained by multiplexing audiodata onto video data, through the antenna ex204 or the cable ex203, etc.that receives a broadcast; a modulation/demodulation unit ex302 thatdemodulates the received multiplexed data or modulates data intomultiplexed data to be supplied outside; and amultiplexing/demultiplexing unit ex303 that demultiplexes the modulatedmultiplexed data into video data and audio data, or multiplexes videodata and audio data coded by a signal processing unit ex306 into data.

Furthermore, the television ex300 further includes: a signal processingunit ex306 including an audio signal processing unit ex304 and a videosignal processing unit ex305 (functioning as the image coding apparatusor the image decoding apparatus according to an implementation of thepresent invention) that decode audio data and video data and code audiodata and video data, respectively; and an output unit ex309 including aspeaker ex307 that provides the decoded audio signal, and a display unitex308 that displays the decoded video signal, such as a display.Furthermore, the television ex300 includes an interface unit ex317including an operation input unit ex312 that receives an input of a useroperation. Furthermore, the television ex300 includes a control unitex310 that controls overall each constituent element of the televisionex300, and a power supply circuit unit ex311 that supplies power to eachof the elements. Other than the operation input unit ex312, theinterface unit ex317 may include: a bridge ex313 that is connected to anexternal device, such as the reader/recorder ex218; a slot unit ex314for enabling attachment of the recording medium ex216, such as an SDcard; a driver ex315 to be connected to an external recording medium,such as a hard disk; and a modem ex316 to be connected to a telephonenetwork. Here, the recording medium ex216 can electrically recordinformation using a non-volatile/volatile semiconductor memory elementfor storage. The constituent elements of the television ex300 areconnected to each other through a synchronous bus.

First, the configuration in which the television ex300 decodesmultiplexed data obtained from outside through the antenna ex204 andothers and reproduces the decoded data will be described. In thetelevision ex300, upon a user operation through a remote controllerex220 and others, the multiplexing/demultiplexing unit ex303demultiplexes the multiplexed data demodulated by themodulation/demodulation unit ex302, under control of the control unitex310 including a CPU. Furthermore, the audio signal processing unitex304 decodes the demultiplexed audio data, and the video signalprocessing unit ex305 decodes the demultiplexed video data, using thedecoding method described in each of Embodiments, in the televisionex300. The output unit ex309 provides the decoded video signal and audiosignal outside, respectively. When the output unit ex309 provides thevideo signal and the audio signal, the signals may be temporarily storedin buffers ex318 and ex319, and others so that the signals arereproduced in synchronization with each other. Furthermore, thetelevision ex300 may read multiplexed data not through a broadcast andothers but from the recording media ex215 and ex216, such as a magneticdisk, an optical disk, and a SD card. Next, a configuration in which thetelevision ex300 codes an audio signal and a video signal, and transmitsthe data outside or writes the data on a recording medium will bedescribed. In the television ex300, upon a user operation through theremote controller ex220 and others, the audio signal processing unitex304 codes an audio signal, and the video signal processing unit ex305codes a video signal, under control of the control unit ex310 using thecoding method described in each of Embodiments. Themultiplexing/demultiplexing unit ex303 multiplexes the coded videosignal and audio signal, and provides the resulting signal outside. Whenthe multiplexing/demultiplexing unit ex303 multiplexes the video signaland the audio signal, the signals may be temporarily stored in thebuffers ex320 and ex321, and others so that the signals are reproducedin synchronization with each other. Here, the buffers ex318, ex319,ex320, and ex321 may be plural as illustrated, or at least one buffermay be shared in the television ex300. Furthermore, although notillustrate, data may be stored in a buffer so that the system overflowand underflow may be avoided between the modulation/demodulation unitex302 and the multiplexing/demultiplexing unit ex303, for example.

Furthermore, the television ex300 may include a configuration forreceiving an AV input from a microphone or a camera other than theconfiguration for obtaining audio and video data from a broadcast or arecording medium, and may code the obtained data. Although thetelevision ex300 can code, multiplex, and provide outside data in thedescription, it may be capable of only receiving, decoding, andproviding outside data but not the coding, multiplexing, and providingoutside data.

Furthermore, when the reader/recorder ex218 reads or writes multiplexeddata from or on a recording medium, one of the television ex300 and thereader/recorder ex218 may decode or code the multiplexed data, and thetelevision ex300 and the reader/recorder ex218 may share the decoding orcoding.

As an example, FIG. 18 illustrates a configuration of an informationreproducing/recording unit ex400 when data is read or written from or onan optical disk. The information reproducing/recording unit ex400includes constituent elements ex401, ex402, ex403, ex404, ex405, ex406,and ex407 to be described hereinafter. The optical head ex401 irradiatesa laser spot in a recording surface of the recording medium ex215 thatis an optical disk to write information, and detects reflected lightfrom the recording surface of the recording medium ex215 to read theinformation. The modulation recording unit ex402 electrically drives asemiconductor laser included in the optical head ex401, and modulatesthe laser light according to recorded data. The reproductiondemodulating unit ex403 amplifies a reproduction signal obtained byelectrically detecting the reflected light from the recording surfaceusing a photo detector included in the optical head ex401, anddemodulates the reproduction signal by separating a signal componentrecorded on the recording medium ex215 to reproduce the necessaryinformation. The buffer ex404 temporarily holds the information to berecorded on the recording medium ex215 and the information reproducedfrom the recording medium ex215. The disk motor ex405 rotates therecording medium ex215. The servo control unit ex406 moves the opticalhead ex401 to a predetermined information track while controlling therotation drive of the disk motor ex405 so as to follow the laser spot.The system control unit ex407 controls overall the informationreproducing/recording unit ex400. The reading and writing processes canbe implemented by the system control unit ex407 using variousinformation stored in the buffer ex404 and generating and adding newinformation as necessary, and by the modulation recording unit ex402,the reproduction demodulating unit ex403, and the servo control unitex406 that record and reproduce information through the optical headex401 while being operated in a coordinated manner. The system controlunit ex407 includes, for example, a microprocessor, and executesprocessing by causing a computer to execute a program for read andwrite.

Although the optical head ex401 irradiates a laser spot in thedescription, it may perform high-density recording using near fieldlight.

FIG. 19 schematically illustrates the recording medium ex215 that is theoptical disk. On the recording surface of the recording medium ex215,guide grooves are spirally formed, and an information track ex230records, in advance, address information indicating an absolute positionon the disk according to change in a shape of the guide grooves. Theaddress information includes information for determining positions ofrecording blocks ex231 that are a unit for recording data. Reproducingthe information track ex230 and reading the address information in anapparatus that records and reproduces data can lead to determination ofthe positions of the recording blocks. Furthermore, the recording mediumex215 includes a data recording area ex233, an inner circumference areaex232, and an outer circumference area ex234. The data recording areaex233 is an area for use in recording the user data. The innercircumference area ex232 and the outer circumference area ex234 that areinside and outside of the data recording area ex233, respectively arefor specific use except for recording the user data. The informationreproducing/recording unit 400 reads and writes coded audio, coded videodata, or multiplexed data obtained by multiplexing the coded audio andvideo data, from and on the data recording area ex233 of the recordingmedium ex215.

Although an optical disk having a layer, such as a DVD and a BD isdescribed as an example in the description, the optical disk is notlimited to such, and may be an optical disk having a multilayerstructure and capable of being recorded on a part other than thesurface. Furthermore, the optical disk may have a structure formultidimensional recording/reproduction, such as recording ofinformation using light of colors with different wavelengths in the sameportion of the optical disk and for recording information havingdifferent layers from various angles.

Furthermore, a car ex210 having an antenna ex205 can receive data fromthe satellite ex202 and others, and reproduce video on a display devicesuch as a car navigation system ex211 set in the car ex210, in thedigital broadcasting system ex200. Here, a configuration of the carnavigation system ex211 will be a configuration, for example, includinga GPS receiving unit from the configuration illustrated in FIG. 17. Thesame will be true for the configuration of the computer ex111, thecellular phone ex114, and others.

FIG. 20A illustrates the cellular phone ex114 that uses the movingpicture coding method and the moving picture decoding method describedin Embodiments. The cellular phone ex114 includes: an antenna ex350 fortransmitting and receiving radio waves through the base station ex110; acamera unit ex365 capable of capturing moving and still images; and adisplay unit ex358 such as a liquid crystal display for displaying thedata such as decoded video captured by the camera unit ex365 or receivedby the antenna ex350. The cellular phone ex114 further includes: a mainbody unit including an operation key unit ex366; an audio output unitex357 such as a speaker for output of audio; an audio input unit ex356such as a microphone for input of audio; a memory unit ex367 for storingcaptured video or still pictures, recorded audio, coded or decoded dataof the received video, the still pictures, e-mails, or others; and aslot unit ex364 that is an interface unit for a recording medium thatstores data in the same manner as the memory unit ex367.

Next, an example of a configuration of the cellular phone ex114 will bedescribed with reference to FIG. 20B. In the cellular phone ex114, amain control unit ex360 designed to control overall each unit of themain body including the display unit ex358 as well as the operation keyunit ex366 is connected mutually, via a bus ex370, to a power supplycircuit unit ex361, an operation input control unit ex362, a videosignal processing unit ex355, a camera interface unit ex363, a liquidcrystal display (LCD) control unit ex359, a modulation/demodulation unitex352, a multiplexing/demultiplexing unit ex353, an audio signalprocessing unit ex354, the slot unit ex364, and the memory unit ex367.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex361 supplies the respective units withpower from a battery pack so as to activate the cell phone ex114.

In the cellular phone ex114, the audio signal processing unit ex354converts the audio signals collected by the audio input unit ex356 invoice conversation mode into digital audio signals under the control ofthe main control unit ex360 including a CPU, ROM, and RAM. Then, themodulation/demodulation unit ex352 performs spread spectrum processingon the digital audio signals, and the transmitting and receiving unitex351 performs digital-to-analog conversion and frequency conversion onthe data, so as to transmit the resulting data via the antenna ex350.Also, in the cellular phone ex114, the transmitting and receiving unitex351 amplifies the data received by the antenna ex350 in voiceconversation mode and performs frequency conversion and theanalog-to-digital conversion on the data. Then, themodulation/demodulation unit ex352 performs inverse spread spectrumprocessing on the data, and the audio signal processing unit ex354converts it into analog audio signals, so as to output them via theaudio output unit ex357.

Furthermore, when an e-mail in data communication mode is transmitted,text data of the e-mail inputted by operating the operation key unitex366 and others of the main body is sent out to the main control unitex360 via the operation input control unit ex362. The main control unitex360 causes the modulation/demodulation unit ex352 to perform spreadspectrum processing on the text data, and the transmitting and receivingunit ex351 performs the digital-to-analog conversion and the frequencyconversion on the resulting data to transmit the data to the basestation ex110 via the antenna ex350. When an e-mail is received,processing that is approximately inverse to the processing fortransmitting an e-mail is performed on the received data, and theresulting data is provided to the display unit ex358.

When video, still images, or video and audio in data communication modeis or are transmitted, the video signal processing unit ex355 compressesand codes video signals supplied from the camera unit ex365 using themoving picture coding method shown in each of Embodiments (that is, thevideo signal processing unit ex355 functions as the image codingapparatus according to an implementation of the present invention), andtransmits the coded video data to the multiplexing/demultiplexing unitex353. In contrast, during when the camera unit ex365 captures video,still images, and others, the audio signal processing unit ex354 codesaudio signals collected by the audio input unit ex356, and transmits thecoded audio data to the multiplexing/demultiplexing unit ex353.

The multiplexing/demultiplexing unit ex353 multiplexes the coded videodata supplied from the video signal processing unit ex355 and the codedaudio data supplied from the audio signal processing unit ex354, using apredetermined method. Then, the modulation/demodulation circuit unit(the modulation/demodulation circuit unit) ex352 performs spreadspectrum processing on the multiplexed data, and the transmitting andreceiving unit ex351 performs digital-to-analog conversion and frequencyconversion on the data so as to transmit the resulting data via theantenna ex350.

When receiving data of a video file which is linked to a Web page andothers in data communication mode or when receiving an e-mail with videoand/or audio attached, in order to decode the multiplexed data receivedvia the antenna ex350, the multiplexing/demultiplexing unit ex353demultiplexes the multiplexed data into a video data bit stream and anaudio data bit stream, and supplies the video signal processing unitex355 with the coded video data and the audio signal processing unitex354 with the coded audio data, through the synchronous bus ex370. Thevideo signal processing unit ex355 decodes the video signal using amoving picture decoding method corresponding to the moving picturecoding method shown in each of Embodiments (that is, the video signalprocessing unit ex355 functions as the image decoding apparatusaccording to an implementation of the present invention), and then thedisplay unit ex358 displays, for instance, the video and still imagesincluded in the video file linked to the Web page via the LCD controlunit ex359. Furthermore, the audio signal processing unit ex354 decodesthe audio signal, and the audio output unit ex357 provides the audio.

Furthermore, similarly to the television ex300, a terminal such as thecellular phone ex114 probably has 3 types of implementationconfigurations including not only (i) a transmitting and receivingterminal including both a coding apparatus and a decoding apparatus, butalso (ii) a transmitting terminal including only a coding apparatus and(iii) a receiving terminal including only a decoding apparatus. Althoughthe digital broadcasting system ex200 receives and transmits themultiplexed data obtained by multiplexing audio data onto video data inthe description, the multiplexed data may be data obtained bymultiplexing not audio data but character data related to video ontovideo data, and may be not multiplexed data but video data itself.

As such, the moving picture coding method and the moving picturedecoding method in each of Embodiments can be used in any of the devicesand systems described. Thus, the advantages described in each ofEmbodiments can be obtained.

Furthermore, the present invention is not limited to Embodiments, andvarious modifications and revisions are possible without departing fromthe scope of the present invention.

Embodiment 5

Video data can be generated by switching, as necessary, between (i) themoving picture coding method or the moving picture coding apparatusshown in each of Embodiments and (ii) a moving picture coding method ora moving picture coding apparatus in conformity with a differentstandard, such as MPEG-2, MPEG4-AVC, and VC-1.

Here, when a plurality of video data that conforms to the differentstandards is generated and is then decoded, the decoding methods need tobe selected to conform to the different standards. However, since towhich standard each of the plurality of the video data to be decodedconforms cannot be detected, there is a problem that an appropriatedecoding method cannot be selected.

In order to solve the problem, multiplexed data obtained by multiplexingaudio data and others onto video data has a structure includingidentification information indicating to which standard the video dataconforms. The specific structure of the multiplexed data including thevideo data generated in the moving picture coding method and by themoving picture coding apparatus shown in each of Embodiments will behereinafter described. The multiplexed data is a digital stream in theMPEG2-Transport Stream format.

FIG. 21 illustrates a structure of the multiplexed data. As illustratedin FIG. 21, the multiplexed data can be obtained by multiplexing atleast one of a video stream, an audio stream, a presentation graphicsstream (PG), and an interactive graphics stream. The video streamrepresents primary video and secondary video of a movie, the audiostream (IG) represents a primary audio part and a secondary audio partto be mixed with the primary audio part, and the presentation graphicsstream represents subtitles of the movie. Here, the primary video isnormal video to be displayed on a screen, and the secondary video isvideo to be displayed on a smaller window in the primary video.Furthermore, the interactive graphics stream represents an interactivescreen to be generated by arranging the GUI components on a screen. Thevideo stream is coded in the moving picture coding method or by themoving picture coding apparatus shown in each of Embodiments, or in amoving picture coding method or by a moving picture coding apparatus inconformity with a conventional standard, such as MPEG-2, MPEG4-AVC, andVC-1. The audio stream is coded in accordance with a standard, such asDolby-AC-3, Dolby Digital Plus, MLP, DTS, DTS-HD, and linear PCM.

Each stream included in the multiplexed data is identified by PID. Forexample, 0x1011 is allocated to the video stream to be used for video ofa movie, 0x1100 to 0x111F are allocated to the audio streams, 0x1200 to0x121F are allocated to the presentation graphics streams, 0x1400 to0x141F are allocated to the interactive graphics streams, 0x1B00 to0x1B1F are allocated to the video streams to be used for secondary videoof the movie, and 0x1A00 to 0x1A1F are allocated to the audio streams tobe used for the secondary video to be mixed with the primary audio.

FIG. 22 schematically illustrates how data is multiplexed. First, avideo stream ex235 composed of video frames and an audio stream ex238composed of audio frames are transformed into a stream of PES packetsex236 and a stream of PES packets ex239, and further into TS packetsex237 and TS packets ex240, respectively. Similarly, data of apresentation graphics stream ex241 and data of an interactive graphicsstream ex244 are transformed into a stream of PES packets ex242 and astream of PES packets ex245, and further into TS packets ex243 and TSpackets ex246, respectively. These TS packets are multiplexed into astream to obtain multiplexed data ex247.

FIG. 23 illustrates how a video stream is stored in a stream of PESpackets in more detail. The first bar in FIG. 23 shows a video framestream in a video stream. The second bar shows the stream of PESpackets. As indicated by arrows denoted as yy1, yy2, yy3, and yy4 inFIG. 23, the video stream is divided into pictures as I-pictures,B-pictures, and P-pictures each of which is a video presentation unit,and the pictures are stored in a payload of each of the PES packets.Each of the PES packets has a PES header, and the PES header stores aPresentation Time-Stamp (PTS) indicating a display time of the picture,and a Decoding Time-Stamp (DTS) indicating a decoding time of thepicture.

FIG. 24 illustrates a format of TS packets to be finally written on themultiplexed data. Each of the TS packets is a 188-byte fixed lengthpacket including a 4-byte TS header having information, such as a PIDfor identifying a stream and a 184-byte TS payload for storing data. ThePES packets are divided, and stored in the TS payloads, respectively.When a BD ROM is used, each of the TS packets is given a 4-byteTP_Extra_Header, thus resulting in 192-byte source packets. The sourcepackets are written on the multiplexed data. The TP_Extra_Header storesinformation such as an Arrival_Time_Stamp (ATS). The ATS shows atransfer start time at which each of the TS packets is to be transferredto a PID filter. The source packets are arranged in the multiplexed dataas shown at the bottom of FIG. 24. The numbers incrementing from thehead of the multiplexed data are called source packet numbers (SPNs).

Each of the TS packets included in the multiplexed data includes notonly streams of audio, video, subtitles and others, but also a ProgramAssociation Table (PAT), a Program Map Table (PMT), and a Program ClockReference (PCR). The PAT shows what a PID in a PMT used in themultiplexed data indicates, and a PID of the PAT itself is registered aszero. The PMT stores PIDs of the streams of video, audio, subtitles andothers included in the multiplexed data, and attribute information onthe streams corresponding to the PIDs. The PMT also has variousdescriptors relating to the multiplexed data. The descriptors haveinformation such as copy control information showing whether copying ofthe multiplexed data is permitted or not. The PCR stores STC timeinformation corresponding to an ATS showing when the PCR packet istransferred to a decoder, in order to achieve synchronization between anArrival Time Clock (ATC) that is a time axis of ATSs, and an System TimeClock (STC) that is a time axis of PTSs and DTSs.

FIG. 25 illustrates the data structure of the PMT in detail. A PMTheader is disposed at the top of the PMT. The PMT header describes thelength of data included in the PMT and others. A plurality ofdescriptors relating to the multiplexed data is disposed after the PMTheader. Information such as the copy control information is described inthe descriptors. After the descriptors, a plurality of pieces of streaminformation relating to the streams included in the multiplexed data isdisposed. Each piece of stream information includes stream descriptorseach describing information, such as a stream type for identifying acompression codec of a stream, a stream PID, and stream attributeinformation (such as a frame rate or an aspect ratio). The streamdescriptors are equal in number to the number of streams in themultiplexed data.

When the multiplexed data is recorded on a recording medium and others,it is recorded together with multiplexed data information files.

Each of the multiplexed data information files is management informationon the multiplexed data as shown in FIG. 26. The multiplexed datainformation files are in one to one correspondence with the multiplexeddata, and each of the files includes multiplexed data information,stream attribute information, and an entry map.

As illustrated in FIG. 26, the multiplexed data information includes asystem rate, a reproduction start time, and a reproduction end time. Thesystem rate indicates the maximum transfer rate at which a system targetdecoder to be described later transfers the multiplexed data to a PIDfilter. The intervals of the ATSs included in the multiplexed data areset to not higher than a system rate. The reproduction start timeindicates a PTS in a video frame at the head of the multiplexed data. Aninterval of one frame is added to a PTS in a video frame at the end ofthe multiplexed data, and the PTS is set to the reproduction end time.

As shown in FIG. 27, a piece of attribute information is registered inthe stream attribute information, for each PID of each stream includedin the multiplexed data. Each piece of attribute information hasdifferent information depending on whether the corresponding stream is avideo stream, an audio stream, a presentation graphics stream, or aninteractive graphics stream. Each piece of video stream attributeinformation carries information including what kind of compression codecis used for compressing the video stream, and the resolution, aspectratio and frame rate of the pieces of picture data that is included inthe video stream. Each piece of audio stream attribute informationcarries information including what kind of compression codec is used forcompressing the audio stream, how many channels are included in theaudio stream, which language the audio stream supports, and how high thesampling frequency is. The video stream attribute information and theaudio stream attribute information are used for initialization of adecoder before the player plays back the information.

In this embodiment, the multiplexed data to be used is of a stream typeincluded in the PMT. Furthermore, when the multiplexed data is recordedon a recording medium, the video stream attribute information includedin the multiplexed data information is used. More specifically, themoving picture coding method or the moving picture coding apparatusdescribed in each of Embodiments includes a step or a unit forallocating unique information indicating video data generated by themoving picture coding method or the moving picture coding apparatus ineach of Embodiments, to the stream type included in the PMT or the videostream attribute information. With the configuration, the video datagenerated by the moving picture coding method or the moving picturecoding apparatus described in each of Embodiments can be distinguishedfrom video data that conforms to another standard.

Furthermore, FIG. 28 illustrates steps of the moving picture decodingmethod according to this embodiment. In Step exS100, the stream typeincluded in the PMT or the video stream attribute information isobtained from the multiplexed data. Next, in Step exS101, it isdetermined whether or not the stream type or the video stream attributeinformation indicates that the multiplexed data is generated by themoving picture coding method or the moving picture coding apparatus ineach of Embodiments. When it is determined that the stream type or thevideo stream attribute information indicates that the multiplexed datais generated by the moving picture coding method or the moving picturecoding apparatus in each of Embodiments, in Step exS102, decoding isperformed by the moving picture decoding method in each of Embodiments.Furthermore, when the stream type or the video stream attributeinformation indicates conformance to the conventional standards, such asMPEG-2, MPEG4-AVC, and VC-1, in Step exS103, decoding is performed by amoving picture decoding method in conformity with the conventionalstandards.

As such, allocating a new unique value to the stream type or the videostream attribute information enables determination whether or not themoving picture decoding method or the moving picture decoding apparatusthat is described in each of Embodiments can perform decoding. Even whenmultiplexed data that conforms to a different standard, an appropriatedecoding method or apparatus can be selected. Thus, it becomes possibleto decode information without any error. Furthermore, the moving picturecoding method or apparatus, or the moving picture decoding method orapparatus in this embodiment can be used in the devices and systemsdescribed above.

Embodiment 6

Each of the moving picture coding method, the moving picture codingapparatus, the moving picture decoding method, and the moving picturedecoding apparatus in each of Embodiments is typically achieved in theform of an integrated circuit or a Large Scale Integrated (LSI) circuit.As an example, FIG. 29 illustrates a configuration of an LSI ex500 thatis made into one chip. The LSI ex500 includes elements ex501, ex502,ex503, ex504, ex505, ex506, ex507, ex508, and ex509 to be describedbelow, and the elements are connected to each other through a bus ex510.The power supply circuit unit ex505 is activated by supplying each ofthe elements with power when the power supply circuit unit ex505 isturned on.

For example, when coding is performed, the LSI ex500 receives an AVsignal from a microphone ex117, a camera ex113, and others through an AVIO ex509 under control of a control unit ex501 including a CPU ex502, amemory controller ex503, a stream controller ex504, and a drivingfrequency control unit ex512. The received AV signal is temporarilystored in an external memory ex511, such as an SDRAM. Under control ofthe control unit ex501, the stored data is segmented into data portionsaccording to the processing amount and speed to be transmitted to asignal processing unit ex507. Then, the signal processing unit ex507codes an audio signal and/or a video signal. Here, the coding of thevideo signal is the coding described in each of Embodiments.Furthermore, the signal processing unit ex507 sometimes multiplexes thecoded audio data and the coded video data, and a stream IO ex506provides the multiplexed data outside. The provided multiplexed data istransmitted to the base station ex107, or written on the recording mediaex215. When data sets are multiplexed, the data should be temporarilystored in the buffer ex508 so that the data sets are synchronized witheach other.

Although the memory ex511 is an element outside the LSI ex500, it may beincluded in the LSI ex500. The buffer ex508 is not limited to onebuffer, but may be composed of buffers. Furthermore, the LSI ex500 maybe made into one chip or a plurality of chips.

Furthermore, although the control unit ex501 includes the CPU ex502, thememory controller ex503, the stream controller ex504, and the drivingfrequency control unit ex512, the configuration of the control unitex501 is not limited to such. For example, the signal processing unitex507 may further include a CPU. Inclusion of another CPU in the signalprocessing unit ex507 can improve the processing speed. Furthermore, asanother example, the CPU ex502 may serve as or be a part of the signalprocessing unit ex507, and, for example, may include an audio signalprocessing unit. In such a case, the control unit ex501 includes thesignal processing unit ex507 or the CPU ex502 including a part of thesignal processing unit ex507.

The name used here is LSI, but it may also be called IC, system LSI,super LSI, or ultra LSI depending on the degree of integration.

Moreover, ways to achieve integration are not limited to the LSI, and aspecial circuit or a general purpose processor and so forth can alsoachieve the integration. Field Programmable Gate Array (FPGA) that canbe programmed after manufacturing LSIs or a reconfigurable processorthat allows re-configuration of the connection or configuration of anLSI can be used for the same purpose.

In the future, with advancement in semiconductor technology, a brand-newtechnology may replace LSI. The functional blocks can be integratedusing such a technology. The possibility is that the present inventionis applied to biotechnology.

Embodiment 7

When video data generated in the moving picture coding method or by themoving picture coding apparatus described in each of Embodiments isdecoded, compared to when video data that conforms to a conventionalstandard, such as MPEG-2, MPEG4-AVC, and VC-1 is decoded, the processingamount probably increases. Thus, the LSI ex500 needs to be set to adriving frequency higher than that of the CPU ex502 to be used whenvideo data in conformity with the conventional standard is decoded.However, when the driving frequency is set higher, there is a problemthat the power consumption increases.

In order to solve the problem, the moving picture decoding apparatus,such as the television ex300 and the LSI ex500 is configured todetermine to which standard the video data conforms, and switch betweenthe driving frequencies according to the determined standard. FIG. 30illustrates a configuration ex800 in this embodiment. A drivingfrequency switching unit ex803 sets a driving frequency to a higherdriving frequency when video data is generated by the moving picturecoding method or the moving picture coding apparatus described in eachof Embodiments. Then, the driving frequency switching unit ex803instructs a decoding processing unit ex801 that executes the movingpicture decoding method described in each of Embodiments to decode thevideo data. When the video data conforms to the conventional standard,the driving frequency switching unit ex803 sets a driving frequency to alower driving frequency than that of the video data generated by themoving picture coding method or the moving picture coding apparatusdescribed in each of Embodiments. Then, the driving frequency switchingunit ex803 instructs the decoding processing unit ex802 that conforms tothe conventional standard to decode the video data.

More specifically, the driving frequency switching unit ex802 includesthe CPU ex502 and the driving frequency control unit ex512 in FIG. 29.Here, each of the decoding processing unit ex801 that executes themoving picture decoding method described in each of Embodiments and thedecoding processing unit ex802 that conforms to the conventionalstandard corresponds to the signal processing unit ex507 in FIG. 29. TheCPU ex502 determines to which standard the video data conforms. Then,the driving frequency control unit ex512 determines a driving frequencybased on a signal from the CPU ex502. Furthermore, the signal processingunit ex507 decodes the video data based on the signal from the CPUex502. For example, the identification information described inEmbodiment 5 is probably used for identifying the video data. Theidentification information is not limited to the one described inEmbodiment 5 but may be any information as long as the informationindicates to which standard the video data conforms. For example, whenwhich standard video data conforms to can be determined based on anexternal signal for determining that the video data is used for atelevision or a disk, etc., the determination may be made based on suchan external signal. Furthermore, the CPU ex502 selects a drivingfrequency based on, for example, a look-up table in which the standardsof the video data are associated with the driving frequencies as shownin FIG. 32. The driving frequency can be selected by storing the look-uptable in the buffer ex508 or in an internal memory of an LSI, andreferring to the look-up table by the CPU ex502.

FIG. 31 illustrates steps for executing a method in this embodiment.First, in Step exS200, the signal processing unit ex507 obtainsidentification information from the multiplexed data. Next, in StepexS201, the CPU ex502 determines whether or not the video data isgenerated by the coding method and the coding apparatus described ineach of Embodiments, based on the identification information. When thevideo data is generated by the coding method and the coding apparatusdescribed in each of Embodiments, in Step exS202, the CPU ex502transmits a signal for setting the driving frequency to a higher drivingfrequency to the driving frequency control unit ex512. Then, the drivingfrequency control unit ex512 sets the driving frequency to the higherdriving frequency. On the other hand, when the identificationinformation indicates that the video data conforms to the conventionalstandard, such as MPEG-2, MPEG4-AVC, and VC-1, in Step exS203, the CPUex502 transmits a signal for setting the driving frequency to a lowerdriving frequency to the driving frequency control unit ex512. Then, thedriving frequency control unit ex512 sets the driving frequency to thelower driving frequency than that in the case where the video data isgenerated by the moving picture coding method and the moving picturecoding apparatus described in each of Embodiment.

Furthermore, along with the switching of the driving frequencies, thepower conservation effect can be improved by changing the voltage to beapplied to the LSI ex500 or an apparatus including the LSI ex500. Forexample, when the driving frequency is set lower, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set to a voltage lower than that in the case where the drivingfrequency is set higher.

Furthermore, when the processing amount for decoding is larger, thedriving frequency may be set higher, and when the processing amount fordecoding is smaller, the driving frequency may be set lower as themethod for setting the driving frequency. Thus, the setting method isnot limited to the ones described above. For example, when theprocessing amount for decoding video data in conformity with MPEG4-AVCis larger than the processing amount for decoding video data generatedby the moving picture coding method and the moving picture codingapparatus described in each of Embodiments, the driving frequency isprobably set in reverse order to the setting described above.

Furthermore, the method for setting the driving frequency is not limitedto the method for setting the driving frequency lower. For example, whenthe identification information indicates that the video data isgenerated by the moving picture coding method and the moving picturecoding apparatus described in each of Embodiments, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set higher. When the identification information indicates thatthe video data conforms to the conventional standard, such as MPEG-2,MPEG4-AVC, and VC-1, the voltage to be applied to the LSI ex500 or theapparatus including the LSI ex500 is probably set lower. As anotherexample, when the identification information indicates that the videodata is generated by the moving picture coding method and the movingpicture coding apparatus described in each of Embodiments, the drivingof the CPU ex502 does not probably have to be suspended. When theidentification information indicates that the video data conforms to theconventional standard, such as MPEG-2, MPEG4-AVC, and VC-1, the drivingof the CPU ex502 is probably suspended at a given time because the CPUex502 has extra processing capacity. Even when the identificationinformation indicates that the video data is generated by the movingpicture coding method and the moving picture coding apparatus describedin each of Embodiments, in the case where the CPU ex502 has extraprocessing capacity, the driving of the CPU ex502 is probably suspendedat a given time. In such a case, the suspending time is probably setshorter than that in the case where when the identification informationindicates that the video data conforms to the conventional standard,such as MPEG-2, MPEG4-AVC, and VC-1.

Accordingly, the power conservation effect can be improved by switchingbetween the driving frequencies in accordance with the standard to whichthe video data conforms. Furthermore, when the LSI ex500 or theapparatus including the LSI ex500 is driven using a battery, the batterylife can be extended with the power conservation effect.

Embodiment 8

There are cases where a plurality of video data that conforms todifferent standards, is provided to the devices and systems, such as atelevision and a mobile phone. In order to enable decoding the pluralityof video data that conforms to the different standards, the signalprocessing unit ex507 of the LSI ex500 needs to conform to the differentstandards. However, the problems of increase in the scale of the circuitof the LSI ex500 and increase in the cost arise with the individual useof the signal processing units ex507 that conform to the respectivestandards.

In order to solve the problem, what is conceived is a configuration inwhich the decoding processing unit for implementing the moving picturedecoding method described in each of Embodiments and the decodingprocessing unit that conforms to the conventional standard, such asMPEG-2, MPEG4-AVC, and VC-1 are partly shared. An example of theconfiguration is shown as ex900 in FIG. 33A. For example, the movingpicture decoding method described in each of Embodiments and the movingpicture decoding method that conforms to MPEG4-AVC have, partly incommon, the details of processing, such as entropy coding, inversequantization, deblocking filtering, and motion compensated prediction.The details of processing to be shared probably include use of adecoding processing unit ex902 that conforms to MPEG4-AVC. In contrast,a dedicated decoding processing unit ex901 is probably used for otherprocessing that does not conform to MPEG4-AVC and is unique to thepresent invention. Since the aspect of the present invention ischaracterized by inverse quantization in particular, for example, thededicated decoding processing unit ex901 is used for inversequantization. Otherwise, the decoding processing unit is probably sharedfor one of the entropy decoding, deblocking filtering, and motioncompensation, or all of the processing. The decoding processing unit forimplementing the moving picture decoding method described in each ofEmbodiments may be shared for the processing to be shared, and adedicated decoding processing unit may be used for processing unique tothat of MPEG4-AVC.

Furthermore, ex1000 in of FIG. 33B shows another example in thatprocessing is partly shared. This example uses a configuration includinga dedicated decoding processing unit ex1001 that supports the processingunique to an aspect of the present invention, a dedicated decodingprocessing unit ex1002 that supports the processing unique to anotherconventional standard, and a decoding processing unit ex1003 thatsupports processing to be shared between the moving picture decodingmethod according to the aspect of the present invention and theconventional moving picture decoding method. Here, the dedicateddecoding processing units ex1001 and ex1002 are not necessarilyspecialized for the processing according to the aspect of the presentinvention and the processing of the conventional standard, respectively,and may be the ones capable of implementing general processing.Furthermore, the configuration of the present embodiment can beimplemented by the LSI ex500.

As such, reducing the scale of the circuit of an LSI and reducing thecost are possible by sharing the decoding processing unit for theprocessing to be shared between the moving picture decoding methodaccording to the aspect of the present invention and the moving picturedecoding method in conformity with the conventional standard.

Although only some exemplary embodiments of the present invention havebeen described in detail above, those skilled in the art will readilyappreciate that many modifications are possible in the exemplaryembodiments without materially departing from the novel teachings andadvantages of the present invention. Accordingly, all such modificationsare intended to be included within the scope of the present invention.

INDUSTRIAL APPLICABILITY

The present invention is advantageously used for a moving picture codingapparatus and a moving picture decoding apparatus.

1. A moving picture decoding method of decoding a current block which isincluded in a current picture, the moving picture decoding methodcomprising: judging whether or not reference pictures in a firstreference picture list and a second reference picture list are locatedin the same side of the current picture; generating a first motionvector predictor and a second motion vector predictor with reference toa first reference motion vector and a second reference motion vector ofa reference block in a reference picture included in the referencepictures; and predicting the current block using the first motion vectorpredictor and the second motion vector predictor; wherein (i) when anyreference pictures in the first reference picture list and the secondreference picture list are located in the same side of the currentpicture in display order, the first motion vector predictor is generatedusing the first reference motion vector, and the second motion vectorpredictor is generated using the second reference motion vector, and(ii) when a reference picture in the first reference picture list andthe second reference picture list are not located in the same side ofthe current picture in display order, and the first reference motionvector and the second reference motion vector refer to differentdirections, both of the first motion vector predictor and the secondmotion vector predictor are generated using only one of the firstreference motion vector and the second reference motion vector.
 2. Amoving picture decoding device for decoding a current block which isincluded in a current picture, the moving picture decoding devicecomprising: a processor; and a memory coupled to the processor; whereinthe processor performs the following: judging whether or not referencepictures in a first reference picture list and a second referencepicture list are located in the same side of the current picture;generating a first motion vector predictor and a second motion vectorpredictor with reference to a first reference motion vector and a secondreference motion vector of a reference block in a reference pictureincluded in the reference pictures; and predicting the current blockusing the first motion vector predictor and the second motion vectorpredictor; wherein (i) when any reference pictures in the firstreference picture list and the second reference picture list are locatedin the same side of the current picture in display order, the firstmotion vector predictor is generated using the first reference motionvector, and the second motion vector predictor is generated using thesecond reference motion vector, and (ii) when a reference picture in thefirst reference picture list and the second reference picture list arenot located in the same side of the current picture in display order,and the first reference motion vector and the second reference motionvector refer to different directions, both of the first motion vectorpredictor and the second motion vector predictor are generated usingonly one of the first reference motion vector and the second referencemotion vector.